Skip to content

Commit 3112594

Browse files
Create Notes.txt
1 parent ecc07b7 commit 3112594

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

7 Priority Queues/Notes.txt

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Priority Queue: Insert from one end and deletemax/min from the other end
2+
Operations: Insert, DeleteMax, RemoveMax
3+
Applications: Huffman coding Algorithm, Dijkstra Algorithm, Prim's MST, Selection problem
4+
Implementation: Unorderedarray, Orderedarray
5+
Unordered LL, Ordered LL
6+
Binary Search Tree, Balanced BST
7+
Binary Heap: 1) O(logn) for insert, delete and update
8+
2) O(1) for deletemin/max
9+
10+
Properties of Heap:
11+
1) Parent must be >= or <= it's children
12+
2) All leaves must be at h or h-1 where h is the max depth of the tree
13+
14+
Binary Heap: Each node has atmost two children

0 commit comments

Comments
 (0)