We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug Report for https://neetcode.io/problems/string-encode-and-decode
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
Instead of having encoded value in decode(), getting it's reference.
class Solution {
public String encode(List<String> strs) { StringBuilder sb = new StringBuilder(); for(String s: strs){ String len = String.format("%04d",s.length()); sb.append(len).append(s); } System.out.println(sb.toString()); return sb.toString(); } public List<String> decode(String str) { List<String> strs = new ArrayList<>(); System.out.println(x); return strs; }
}
sout in encode: 0004neet0004code0004love0003you sout in decode: [Ljava.lang.String;@2d98a335
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug Report for https://neetcode.io/problems/string-encode-and-decode
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
Instead of having encoded value in decode(), getting it's reference.
class Solution {
}
sout in encode: 0004neet0004code0004love0003you
sout in decode: [Ljava.lang.String;@2d98a335
The text was updated successfully, but these errors were encountered: