المدة الزمنية 8:56

Find Median from Data Stream | Two Heap | Coding Interview

بواسطة InvolveInInnovation
9 161 مشاهدة
0
129
تم نشره في 2020/03/15

In this lesson, we will see how to find the median from the data stream. The problem statement is Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle values. Design a data structure that supports the following two operations: void addNum(int num) - Add an integer number from the data stream to the data structure. double findMedian() - Return the median of all elements so far. LeetCode link - Github code link - https://github.com/JayaramachandranAugustin/Interview/blob/master/Algorithm/Heap/find_median_from_data_stream.md #Heap #coding_interview #Median Heap data structure : /watch/MJhCS2zWSIOWC To prepare for the interview: ----------------------------------- Complete list of questions and answers for cracking the coding interview: https://github.com/JayaramachandranAugustin/Interview Algorithm Tutorial playlist: /watch/AbRIci7vhhcrv7ERNeKGb9zm2IbI9E10LP=tsil&4V34dC-ui4FuI

الفئة

عرض المزيد

تعليقات - 8