What kind of math do you use to traverse the 4-heap when using an array to store all the elements? Specifically, how do you find the index of a parent node to a specific leaf?
Let's say I have the following array:
0|1|2|3|4|5|6|7|8|9|10|... etc.
with the heap then constructed from that with 1 being the root, 2..5 its children, 6..9 2's children etc.
What exactly is the math i need if I need to find (for example) the parent of 6?