12/06/2024, 00:48 DS Assignment 4 - DATA STRUCTURE
ASSIGNMENT – 4, Odd Semester (2023-24)
Programme: B.Tech. Semester : 3rd
Subject Code: BCS-301 Subject: DATA STRUCTURE M.M.: 10
KL1- Remembering KL4- Analyzing
KL2- Understanding KL5- Evaluating
Knowledge Level (KL)
KL3- Applying KL6- Creating
Date of Assignment: 12/01/2024 Date of Submission: 17/01/2024
1. Differentiate between liner and binary search algorithm. Write a recursive
CO3 K2
function to implement binary search.
Use the merge sort algorithm to sort the following elements in ascending
2. order. CO3 K2
13, 16, 10, 11, 4, 12, 6, 7.
What is the time and space complexity of merge sort?
3. Use quick sort algorithm to sort 15,22,30,10,15,64,1,3,9,2. Is it a stable
sorting algorithm? Justify.
CO3 K2
4. Write a C program for Index Sequential Search.
CO3 K2
5. (i) Examine the minimum number of interchanges needed to convert the
array 90, 20, 41,18, 13, 11, 3, 6, 8,12, 7, 71, 99 into a maximum heap. CO3 K2
(ii) Write an algorithm for Heap Sort. Use Heap sort algorithm to sort the
following sequence:
18, 25, 45, 34, 36, 51, 43, and 24.
Name of Subject Coordinator Head of Department
about:blank 1/1
ASSIGNMENT – 4, Odd Semester (2023-24)
Programme: B.Tech. Semester : 3rd
Subject Code: BCS-301 Subject: DATA STRUCTURE M.M.: 10
KL1- Remembering KL4- Analyzing
KL2- Understanding KL5- Evaluating
Knowledge Level (KL)
KL3- Applying KL6- Creating
Date of Assignment: 12/01/2024 Date of Submission: 17/01/2024
1. Differentiate between liner and binary search algorithm. Write a recursive
CO3 K2
function to implement binary search.
Use the merge sort algorithm to sort the following elements in ascending
2. order. CO3 K2
13, 16, 10, 11, 4, 12, 6, 7.
What is the time and space complexity of merge sort?
3. Use quick sort algorithm to sort 15,22,30,10,15,64,1,3,9,2. Is it a stable
sorting algorithm? Justify.
CO3 K2
4. Write a C program for Index Sequential Search.
CO3 K2
5. (i) Examine the minimum number of interchanges needed to convert the
array 90, 20, 41,18, 13, 11, 3, 6, 8,12, 7, 71, 99 into a maximum heap. CO3 K2
(ii) Write an algorithm for Heap Sort. Use Heap sort algorithm to sort the
following sequence:
18, 25, 45, 34, 36, 51, 43, and 24.
Name of Subject Coordinator Head of Department
about:blank 1/1