90 likes | 221 Vues
This assignment provides a comprehensive exploration of various data structures, focusing on heaps, AVL trees, and splay trees. It includes detailed steps for adding and removing nodes in a heap with values 62, 22, 55, etc. It also covers multiple insertions and removals in AVL trees with specific values, demonstrating the balance and restructuring process. Lastly, it explores the splay tree operations, illustrating how to splay nodes through specific sequences. Each section is structured to enhance understanding of tree operations and their implications.
E N D
#1 Heaps • Show each step while • Adding the following nodes • 62 22 55 33 77 88 53 90 99 • Removing all the nodes
#2 Insertion in an AVL Tree • Insert 61 48 32 50 17 44 49 78 62 88
#3 Insertion in an AVL Tree • Insert 98 48 32 50 17 44 49 78 62 88
#4 Removal from an AVL Tree • Remove 92 48 32 78 17 50 88 92 49 64
#5 Removal from an AVL Tree • Remove 17 48 32 78 17 50 88 92 49 64
#6 Splaying • Splay 14 8 3 10 4 11 6 12 5 7 15 13 17 14
#7 Splaying • Splay 17 8 3 10 4 11 6 12 5 7 15 13 17 14
Insert 4,7,12,15,3,5,22,10 #8 Insertion into a Splay Tree