Wrong test case for C++

  • 0


    Output: [null,null,null,null,null,null,null,"world","hello",null,null,null,"world","leet",null,null,"leet"]

    Expected: [null,null,null,null,null,null,null,"hello","world",null,null,null,"world","leet",null,null,"hello"]

    In fact, the output is also right, regarding can output any string with draw frequency.

    Please correct me if I'm wrong.

  • 0

    Where exactly do you think it's wrong? Your output btw is clearly wrong, as your first "world" is not a max key there (its value is 1, while "hello" has value 3).

  • 0

    Sorry my bad. just noticed there's a "dec" in input, not a straight "inc".
    All corrected. Thanks!

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.