253. Meeting Rooms II Link 378. Kth Smallest Element in a Sorted Matrix Link Also it has a Modified Binary approach 451. Sort Characters By Frequency Link [Pending] 719. Find K-th Smallest Pair Distance Link [Pending] 218. The Skyline Problem Link [Pending] 1054. Distant Barcodes Link [Pending] 759. Employee Free Time Link [Pending] 239. Sliding… Continue reading Private: LeetCode heap
Tag: Heap
Heap – Theory
Binary Heap is the underlying implementation of Priority Queue. A heap can be visualized to have a tree structure logically. This tree satisfies the two heap properties - value property and the shape property. Although the heap is a tree, because of the heap property it's easy to implement it as an array. Binary Heap is… Continue reading Heap – Theory
Priority Queue – Theory
Java Docs In computer science, a priority queue is an abstract data type which is like a regular queue or stack data structure, but where additionally each element has a "priority" associated with it. In a priority queue, an element with high priority is served before an element with low priority. If two elements have the same priority, they are served according to their… Continue reading Priority Queue – Theory
Heap | Set 1
1,2,3,5,7,12,14, 19/20, 21, 22, **23, **25 Heap is the underlying implementation of Priority Queue. We use Priority Queue classes to implement min and max heaps in Java. SO 1 Index array for heap - Parent = i/2 Child = 2*i , 2*i + 1 Last Non-Leaf Node = floor(n/2); (First non leaf node is at… Continue reading Heap | Set 1
You must be logged in to post a comment.