Question 16
Which condition is sufficient for a binary tree to be complete?
This is the standard definition of a complete binary tree.
Which condition is sufficient for a binary tree to be complete?
This is the standard definition of a complete binary tree.
In a 0-based array representation of a binary heap, what is the index of the left child of node i?
For 0-based heaps, left(i)=2i+1 and right(i)=2i+2.
In a 0-based array representation of a binary heap, what is the index of the right child of node i?
For 0-based heaps, right(i)=2i+2.
In a max-heap, which property is guaranteed for every node with a parent?
Max-heaps satisfy parent >= each child.
What is the worst-case time complexity of searching in a skewed BST with n nodes?
A skewed BST can have height n-1.