SKEW HEAP

 

By Soheil Pourhashemi

 

·        Only integer entries are accepted in the text field.

·        To insert an element, type an integer in the text field and click on “Insert”. Continue clicking at will on “NextStep” to trace the algorithm until the button is disabled and insertion is terminated. Step by step status is given in the information box.

·        To delete the minimum element in the heap, click on “DeleteMin”. Continue clicking at will on “NextStep” to trace the algorithm until the button is disabled and the union of the two heaps are complete. Step by step status is given in the information box.

·        To perform a union on two heaps click on Union and continue clicking on Next Step until the algorithm is terminated. Step by step status is given in the information box.

·        To switch to a new heap to operate on, click on Switch. The current heap will move to the bottom. If there is already a heap on the bottom then that will become the new working heap. All operations (except for union) operate exclusively on the top heap.

·        If two nodes overlap due to overcrowding of nodes in the window, it is possible to drag the top node to the side with the mouse to see the node below.

 

Node Color Index:

 

Blue: Insert/Join Node

Green: New root

Red: Merge Node/Path

Orange: Swapping Node