ABSS INSTITUTE OF TECHNOLOGY, MEERUT
First Sessional Test – Session 2023-24
Roll No……………. Sub: Design and Analysis of Algorithm Code: KCS-502 Time: 1:00 Hr. M.M: 30
General Instructions: 1. Attempt all sections. If require any missing data then choose suitably.
2. The intended marks for questions or parts of questions are given in brackets.
SECTION – A
Ques1. Attempt all questions [2X4 = 8]
(a) What is Merge sort? Analyze its complexity
(b) How analyze the performance of an algorithm in different cases.
(c) Explain divide and conquer approach.
(d) Difference between algorithm and pseudocode.
SECTION – B
Ques2. Attempt any three of the following: [3X4= 12]
(a) Solve the recurrence
T (n) = T(n-1) + 1 using substitution method
(b) Solve the recurrence
T (n) = 2T(n/2) + n using Recursion tree method(Given if n>1)
(c) What is algorithm? Write an algorithm of bubble sort?
(d) Sort the following sequence {25, 57, 48, 36, 12, 91, 86, 32} using Quick sort.
SECTION – C
Ques3. Attempt any two of the following: [2X5 = 10]
a) Write insertion sort algorithm also derive the time complexity of insertion sort in best, average
and worst case.
b) Sort the following sequence {6, 4, 2, 1, 9, 8, 3, 5} using merge sort.
c) What is Asymptotic notation? Explain Big O and Big