Skip to content

Commit 102c672

Browse files
committed
Priority Queue
1 parent dd239b5 commit 102c672

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Priority Queue/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ In this case, our queue is min-priority oriented and uses Minimum Heap propertie
99
Priority Queue uses an Array internally which starts at index 1.
1010

1111
for every index in the Array:
12+
1213
left child is index * 2
14+
1315
right child is (index * 2) + 1
16+
1417
parent is floor(index/2)
1518

1619
Parents must have priority value lesser than their childs.

0 commit comments

Comments
 (0)