Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug Report for string-encode-and-decode #4882

Open
@shahidbits-cs

Description

@shahidbits-cs

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp