CS计算机代考程序代写 AVL CSC263H1 Summer 2021 Term Test 1

CSC263H1 Summer 2021 Term Test 1

Submission Instructions

� You may type your answers or hand-write them legibly.

� You may submit your answers as a single document or as multiple documents.

� You may name your file(s) any way you want (there is no “required file” except for aidsheet.pdf).

� You may submit your answers in PDF or in photos (JPEG/JPG/PNG/GIF/HEIC/HEIF), but
NOT other formats (In particular, Word documents cannot be accepted – please export to
PDF before submitting.)

Question 3 AVL Trees [5 marks]

Delete the node with key 14 from the following AVL tree, performing all necessary rotations so that
the tree maintains its AVL property after deletion. After performing each rotation, draw the tree
after that rotation and indicate clearly what rotation was performed by writing something similar to
Rotate left on Node X. Treat a double rotation as two individual rotations. If no rotations are
necessary, simply draw the final tree and note that explicitly.

12

4

2

0

1

3

8

6 10

19

14 20

23

There are 4 other questions in this test.
Remember that you must submit your aid sheet along with your answers.