Professional Documents
Culture Documents
Instructions:
Q1. Give short answers to all these questions. (15 Marks)
(a) What we mean by asymptotic complexity PART A do we compare algorithms?
and how
(b) Define different types of asymptotic notations.
(c) Proof that a complete binary tree with N nodes has height of O(logN).
(d) What is a Left-justified binary tree?
(e) Write the names of all shortest path algorithms and their complexity.
(a) Give Adjacency Matrix and Adjacency List representation of above graph.
(b) Find the shortest path from node 1 to all other nodes using Dijkstra’s algorithm.
Q3. (a) What are the Heap procedures for sorting? Write down the complexity of Heap
procedures. (2.5 Marks)
(b) Define priority queues and the applications of priority queues. (2.5 Marks)
(c) Sort the list by heapsort using the array representation of heaps. (5 Marks)
Page 1 of 1