Question: Can I get some help converting these functions into higher level pseudocode? They're methods from a binary heap implementation, but I'm having a hard time
Can I get some help converting these functions into higher level pseudocode? They're methods from a binary heap implementation, but I'm having a hard time understanding all the notation

function makeheap(S) h = empty array of size S for reS: h(h|+ 1) = 2 for i= |S| downto 1: siftdown(h, h(i), i) return h procedure bubbleuph, s, i) (place element in position i of h, and let it bubble up) p= [1/2] while i #1 and key(h(p) > key(2): h(i)h(p); i = p; p= [i/2] h(i) = 2 procedure siftdown(h,,i) (place element in position i of h, and let it sift down) c=minchildh, i) while c70 and key(h(c))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
