Suppose you set the key for each position p of a binary tree T equal to its preorder rank. Under what circumstances is T a heap?
1) T will never be a heap under any circumstances.
2) Only if T is also complete.
3) Only if T is a balanced tree.
4) T will always be a heap.



Answer :

Other Questions