Using what formula can a parent node be located in an array?

Q & ACategory: Data StructureUsing what formula can a parent node be located in an array?
Admin Staff asked 4 years ago

Using what formula can a parent node be located in an array?
a) (i+1)/2
b) (i-1)/2
c) i/2
d) 2i/2

1 Answers
Admin Staff answered 4 years ago

b) (i-1)/2