Consider the following sequence of 14 operations on an initially empty search tree:
Consider the following sequence of 14 operations on an initially empty search tree:
1. Insert Bob
2. Insert Tim
3. Insert Fred
4. Insert Peter
5. Insert Jane
6. Remove Tim
7. Insert Laura
8. Insert Nancy
9. Insert Hank
10. Remove Peter
11. Insert Rhea
12. Insert David
13. Remove Rhea
14. Remove Nancy
- The above sequence of operations is to be performed in the exact manner into each of the following trees –
- BST
- AVL Tree
- 2-3 Tree
- Max Heap
- Draw how each tree is structured at the following 3 steps:
- After ‘Remove Tim’ step (step 6)
- After ‘Remove Peter’ step (step 10)
- After ‘Remove Nancy’ step (step 14)
- For the insertion steps – follow the ‘smaller node to the left subtree / greater or equal node to the right subtree’ algorithm, except for the heap where you should follow the conventional method for inserting nodes into a heap.
- For the removal steps – follow the ‘in-order successor replacement’ algorithm, except for the heap where you should follow the conventional method for removing nodes from a heap.
- There should be a total of 3 diagrams per tree – finish one tree fully before starting on a different tree. Draw and sequence your diagrams clearly – if I can’t understand them then you lose points.
- If you need to make any assumptions or encounter any limitations, state them clearly.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.