Heap
Problem www.hackerrank.com This problem is that we calculate median of array the range is from 0 to ith. Solution By using Two Priority Queues: minHeap and maxHeap, we can solve this problem. The roles of them are following. minHeap : To s…
What is Heap Reference www.youtube.com Heap is the tree structure that has two following restrictions. Binary Tree Parent node is smaller or bigger than children nodes. Heap is good at controlling the relation about small and large. So hea…