Confusing about one test case Or I misunderstand this quesiton


  • 0
    F

    ["MedianFinder","addNum","findMedian","addNum","findMedian","addNum","findMedian","addNum","findMedian","addNum","findMedian","addNum","findMedian","addNum","findMedian","addNum","findMedian","addNum","findMedian","addNum","findMedian","addNum","findMedian"]
    [[],[6],[],[10],[],[2],[],[6],[],[5],[],[0],[],[6],[],[3],[],[1],[],[0],[],[0],[]]

    so the list is {6, 10, 2, 6, 5, 0, 6, 3, 1, 0, 0}
    and the MedianFinder result should be: 6, 8, 10, 6, 2, 4, 6, 5.5, 5, 2.5, 0

    But it offers answer as follows:
    [null,null,6.00000,null,8.00000,null,6.00000,null,6.00000,null,6.00000,null,5.50000,null,6.00000,null,5.50000,null,5.00000,null,4.00000,null,3.00000]

    Or I misunderstand this quesiton


Log in to reply
 

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