50 likes | 164 Views
CS208. Coursework 3 Individual (not Group) Work! Due Friday 25 May, 12pm. 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. CS203 CW3 Page 2.
E N D
CS208 Coursework 3 Individual (not Group) Work! Due Friday 25 May, 12pm
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
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.
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