Vuhelper
06-02-2011, 07:54 PM
Assignment No. 03
SEMESTER Spring 2011
CS301- Data Structures
Total Marks: 20
Due Date: 09/06/2011
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit (zero marks) if:
o The assignment is submitted after due date.
o The submitted assignment does NOT open or file corrupt.
o The assignment is copied (from other student or ditto copy from handouts or internet).
Objective
The objective of this assignment is
o To give you some practice exercise of AVL Trees.
What to Submit
Submit the word file. Kindly note that C++ code is NOT required for this assignment.
For any query about the assignment, contact at
GOOD LUCK
Marks: 20
Question_1: [5 marks]
Consider the following AVL Tree
Insert new node with value 35 in the above AVL Tree and perform the necessary rotations so that it remains AVL. [show all steps]
Question_2: [15 marks]
Consider the following sequence of numbers:
[ 65, 80, 25, 40, 70, 90, 10, 75, 30, 5, 50, 85, 15, 100, 60, 45, 20, 35, 95, 55 ]
Draw AVL Tree. [no need to show all steps, just draw final tree] [5 marks]
Delete 5 from the AVL Tree constructed above, re-balance after deletion. [show all steps] [10 marks]
Lectures Covered: This assignment covers Lecture # 20-24
Deadline: Your assignment must be uploaded/submitted on or before 09-June-2011.
SEMESTER Spring 2011
CS301- Data Structures
Total Marks: 20
Due Date: 09/06/2011
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit (zero marks) if:
o The assignment is submitted after due date.
o The submitted assignment does NOT open or file corrupt.
o The assignment is copied (from other student or ditto copy from handouts or internet).
Objective
The objective of this assignment is
o To give you some practice exercise of AVL Trees.
What to Submit
Submit the word file. Kindly note that C++ code is NOT required for this assignment.
For any query about the assignment, contact at
GOOD LUCK
Marks: 20
Question_1: [5 marks]
Consider the following AVL Tree
Insert new node with value 35 in the above AVL Tree and perform the necessary rotations so that it remains AVL. [show all steps]
Question_2: [15 marks]
Consider the following sequence of numbers:
[ 65, 80, 25, 40, 70, 90, 10, 75, 30, 5, 50, 85, 15, 100, 60, 45, 20, 35, 95, 55 ]
Draw AVL Tree. [no need to show all steps, just draw final tree] [5 marks]
Delete 5 from the AVL Tree constructed above, re-balance after deletion. [show all steps] [10 marks]
Lectures Covered: This assignment covers Lecture # 20-24
Deadline: Your assignment must be uploaded/submitted on or before 09-June-2011.