how do I implement the percolate-down function in Heap data structure using nodes?
<p>I am creating my max-heap data structure by using nodes to make the binary tree, rather then array.
Now, I want to create a percolate-down function, how should I implement this function? is there any other way but recursion to do the job? I'm trying to use loops but all my tries failed, I hope someone could help me, thank you in advance.</p>