TweakCode
Recursion lessons
Loading editor…
Test casesRun to compare output
Input
ops = ["MedianFinder","addNum","addNum","findMedian","addNum","findMedian"], args = [[],[1],[2],[],[3],[]]
Output
—
Expected
[null,null,null,1.5,null,2]

More practice

Same technique, different problems. Try them without the walkthrough.