This is [chapter number:: 17]
Problems
- Binary Heap Operations
- Heap Sort
- Kth smallest element
- Kth Largest element
- K most occuring elements Minimum Cost of ropes
- Nearly sorted
- Merge K sorted arrays Rearrange characters
- Find Median in a Stream
Binary heap
Should always be a complete binary tree- This means that at every level, except possibly the last, all nodes are completely filled, and all nodes are as far left as possible.- A complete binary tree, when represented as an array, will have no null values except for the first element at position 0- push and pop operations for heap- in array implementation insert the element at the end of…