Error in test case?

  • 2

    I got "Submission Result: Wrong Answer" due to following test case,
    can anybody explain the expected behavior?

  • 0

    Seems more test cases were added and corners cases were not fully covered.

  • 0

    This output may likely come when we store the count of the numbers in a heap. So the heap may look like this [1,2,3] . So when the first max element is removed , 1 is removed and then heap looks like [3,2,1] then max is removed , 3 is removed. Hence the output. Testcases should accept multiple possible outputs.

  • 0

    @shilpa6 I think that makes sense. nice notice

Log in to reply

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