Explained on whiteboard for better understanding as we used to learn in childhood school :)
Discussed Time Complexity for simple approach and implement a very efficient solution using MinHeap & MaxHeap.
Explained what is Heap, MaxHeap and MinHeap.
Easy to understand by any one.
#heap #leetcode #javainterviewquestions #whiteboard