2 Comments

Love the reminder/review of fundamentals.

parent(i) = floor(i/2) -1

should be

parent(i) = floor((i - 1) / 2)

Expand full comment