#295

Find Median from Data Stream

hard· Heap / Priority Queueruns: 0

The median is the middle value in an ordered list, or the average of the two middle values when the list has an even number of elements. Design a data structure that supports adding integers from a stream and finding the running median. Implement MedianFinder with addNum and findMedian.

sign in to paste and practice your own solution
desktop only

codedrill is a typing game and needs a real keyboard. open this on a laptop or desktop to practice.

you can still browse problems and sections from your phone.