- Notifications
You must be signed in to change notification settings - Fork2.4k
Open
Description
Bug Report forhttps://neetcode.io/problems/string-encode-and-decode
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
I am not seeing the expected logs in stdout for the ones added if block and/or after if block in decode method. At least,one of the logs must be printed.
public List<String> decode(String str) { System.out.println(str + " ** "); // <<--- printed String[] tokens = str.split(sizeDelim); System.out.println(str + " ^^ "); // <<--- printed if ("0".equals(tokens[0])) { System.out.println("1=" + str + " -- "); // <<--- not printed System.out.println("-- tokens[0]=" + tokens[0]); // <<--- not printed return Collections.EMPTY_LIST; } if (tokens[1] == null || tokens[1].equals("")) { System.out.println("2=" + str + " == "); // <<--- not printed System.out.println("tokens[1]=" + tokens[1]); // <<--- not printed return List.of(""); } System.out.println("3=" + str + " __ "); // <<--- not printed System.out.println("-- tokens[1]=" + tokens[1]); // <<--- not printed return Arrays.asList(tokens[1].split(delim)); }
Metadata
Metadata
Assignees
Labels
No labels