CS3401 Set3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

B.E / B.Tech.

PRACTICAL END SEMESTER EXAMINATIONS, APRIL/MAY 2023


Fourth Semester

CS3401 - ALGORITHMS

(Regulations 2021)

Time : 3 Hours Answer any one Question Max. Marks 100

Aim/Principle/Apparatus Tabulation/Circuit/ Calculation Viva-Voce Record Total


required/Procedure Program/Drawing & Results
20 30 30 10 10 100

1. Write a program to calculate the time complexity for the given search key using the linear search
algorithm.

List=[12,34,56,13,56,73,78,90,1,34,67]

Search key= 1

Search key= 73

2. Write a program to implement recursive binary search and calculate the time complexity for
various search keys.

3. Write a program to perform heap sort over list of n element and plot the difference noted when n
changes as follows

n = 12, n=7, n=10, n=25

4. Write a program to implement graph traversal using the breath first search mechanism.

5. Write a program to implement graph traversal using the depth first search mechanism.

6. Write a program to sort the following elements with the help of Insertion sort

[12, 45, 78, 96, 56, 77, 51, 8, 104, 96]

7. Write a program to implement Prim’s algorithm

Page 1 of 2
8. Write a program to calculate the all pair shortest path for the following graph

9. Write a program to compute the transitive closure of a given directed graph using Warshall's
algorithm.

10. Using the divide and conquer strategy, write a program to identify the minimum element present
inside the given list.

11. Write a program to sort the following element with the help of quick sort

[73, 42, 18, 85, 6, 97 51, 24, 90, 13]

12. Write a program to identify the maximum of a list using the divide and conquer strategy.

13. Write a program to sort the following elements with the help of merge sort

[12, 45, 78, 96, 56, 77, 51, 8, 104, 96]

14. Write a program to implement the concept of N Queens problem over the board of 8 Queens.

15. Write a program to implement randomized algorithms for finding the kth smallest number

Page 2 of 2

You might also like