HNDSE 21.2F Programming Data Structures and Algorithms
HNDSE 21.2F Programming Data Structures and Algorithms
B. Implement methods to take inputs for the above data structures a) and b). Use the
standard names of the methods. Assume that all the other methods are available.
(8 marks)
C. Implement methods to remove values from the above data structures. Use the standard
names of the methods. Assume that all the other methods are available. (8 marks)
Page 1 of 4
Question 3 (27 Marks)
A. Introduce below trees very briefly.
i. Binary tree (2 Marks)
ii. AVL tree (2 Marks)
iii. Red, black tree. (2 Marks)
E. You are required to read an array and sort the numbers using one of the techniques below.
(7 Marks)
Bubble sort
Insertion sort
Merge sort
Page 2 of 4
Question 4 (23 Marks)
A. Find the shortest path from ‘S’ to each vertex in the below graph using Dijkstra’s
algorithm. (8 marks)
B.
i. Draw 3 spanning tress for below graph. (6 marks)
ii. Find the Minimum Cost Spanning Tree for the below graph using Kruskal’s
Algorithm. (9 marks)
Page 3 of 4
Question 5 (10 Marks)
A. For the function f(n) given below, give an asymptotic upper bound using “big-O" notation.
B.
i. Describe the meaning of Space complexity. [2 marks]
ii. Short Description for Big - Oh (O) Asymptotic Notation. [1 mark]
iii. Short Description for Big - Omega (Ω) Asymptotic Notation. [1 mark]
iv. Short Description for Big - Theta (Θ) Asymptotic Notation. [1 mark]
Page 4 of 4