1 / 5

CS208 Coursework 3: AVL and Red-Black Trees Exploration

This coursework focuses on advanced tree data structures. You are required to complete several tasks: first, create five AVL trees using the numbers 1 through 6. Next, determine the number of unique AVL trees that can be formed with the numbers 1 through 4. Additionally, illustrate the insertion of the number 11 into a given AVL tree and explain the rotation process involved. Finally, provide five red-black trees containing the numbers 1 to 6 that do not qualify as AVL trees. Ensure clarity and correctness in your explanations and illustrations.

Télécharger la présentation

CS208 Coursework 3: AVL and Red-Black Trees Exploration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS208 Coursework 3 Individual (not Group) Work! Due Friday 25 May, 12pm

  2. AVL Trees • Question 1: Give 5 AVL trees containing the numbers 1,2,3,4,5 and 6 • Question 2: How many AVL trees are there containing the numbers 1,2,3 and 4

  3. CS203 CW3 Page 2 • Question 3: What is the result of inserting 11 into the AVL tree 6 / \ 4 8 / \ / \ E E E 9 Use the algorithm for inserting data into an AVL tree given in the lectures. Give a clear explanation of why your answer is correct, show the result of the intermediate result of creating a BST and clearly describe any rotations you use.

  4. CS208 CW3 Page 3 • Give 5 trees which are red/black trees but not AVL trees which contain the data 1,2,3,4,5,6

More Related