What are the children for node ‘w’ of a complete-binary tree in an array…
2023
What are the children for node ‘w’ of a complete-binary tree in an array representation?
- A.
2w and 2w+1
- B.
2+w and 2-w
- C.
w+1/2 and w/2
- D.
w-1/2 and w+1/2
Attempted by 233 students.
Show answer & explanation
Correct answer: A
Answer: a
Explanation: The left child is generally taken as 2*w whereas the right child will be taken as 2*w+1 because root node is present at index 0 in the array and to access every index position in the array.