In skew heaps, certain constraints are to be met in order to perform swapping.

Category: QuestionsIn skew heaps, certain constraints are to be met in order to perform swapping.
Editor">Editor Staff asked 1 month ago

In skew heaps, certain constraints are to be met in order to perform swapping.
 
(a) true
 
(b) false
 
This question is from Heap in section Heap of Data Structures & Algorithms I
 
I have been asked this question during an interview.

1 Answers
Editor">Editor Staff answered 1 month ago

The correct choice is (b) false
 
Best explanation: In skew heaps, swaps are unconditional. It is done with the exception that the largest of all nodes does not have its children swapped.