I got "Submission Result: Wrong Answer" due to following test case,
can anybody explain the expected behavior?
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.
@shilpa6 I think that makes sense. nice notice
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.