Question 56
In a binary heap stored with 1-based indexing, what is the left child index of i?
For 1-based heaps, children are at 2i and 2i+1.
In a binary heap stored with 1-based indexing, what is the left child index of i?
For 1-based heaps, children are at 2i and 2i+1.
In a binary heap stored with 1-based indexing, what is the right child index of i?
For 1-based heaps, right child is 2i+1.
Which structure is a complete binary tree satisfying the heap-order property?
A binary heap is a complete binary tree with heap order.
What is the minimum number of nodes in an AVL tree of height h using N(0)=1 and N(1)=2?
The minimum AVL tree combines minimum trees of heights h-1 and h-2 plus the root.
What is the asymptotic height of a red-black tree with n nodes?
Red-black balancing guarantees logarithmic height.