The largest item in a heap must appear in position 1, and the second largest must be in position 2 or position 3. Give the list of positions in a heap of size 31 where the kth largest (i) can appear, and (ii) cannot appear, fork=2, 3, 4 (assuming the values to be distinct).

Solved
Show answers

Ask an AI advisor a question