what are 4 heap operations
-find min/max
-delete min/max
-insert element
-bouiding heap
time complexity of find min
O(1)
insert elemnt time complexity
O(log n)
dequeue time complexity
O(n log n)
building heaps code
Given an array of numbers fix each element
For (x = (n/2)-1; x >= 0; –x){
Trickle down to restore heap property
}