We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
/*
thanks Gayle for explaining the heap based approach ( https://www.youtube.com/watch?v=VmogG01IjYc )
the idea is to keep 2 heaps minHeap and maxHeap, during the traversal on input maintain heaps such that if we maintain the median position at the top.
*/
Find the Running Median
You are viewing a single comment's thread. Return to all comments →
/* thanks Gayle for explaining the heap based approach ( https://www.youtube.com/watch?v=VmogG01IjYc ) the idea is to keep 2 heaps minHeap and maxHeap, during the traversal on input maintain heaps such that if we maintain the median position at the top. */