Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

CS3401 Set1

Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 3

College Code/Name: 9129/ ULTRA College of Engineering and Technology

B.E / B.Tech. PRACTICAL END SEMESTER EXAMINATIONS,NOV/DEC 2023

Fourth Semester

CS3401 – ALGORITHMS LABORATORY

(Regulations - 2021)
Date: 22.11.2023
Time: 3 Hours Answer any one Questions Max. Marks 100

Aim/Principle/Apparatus Tabulation/ Calculatio Viva-Voce Recor Total


Circuit/ n d
required/Procedure
Program/ & Results
2 30 30 10 10 100
0

1. Implement the binary search algorithm in C and analyse its time complexity.

2. Implement Linear Search. Determine the time required to search for an element. Repeat the
experiment for different values of n, the number of elements in the list to be searched and plot a graph
of the time taken versus n.

3. Implement Insertion sort and repeat the experiment for different values of n, the number of elements
in the list to be sorted and plot a graph of the time taken versus n.

4. Given a text txt [0...n-1] and a pattern pat [0...m-1], write a function search (char pat [ ], char txt [ ])
that prints all occurrences of pat [ ] in txt [ ]. You may assume that n > m.

5. Develop a program to implement graph traversal using Breadth First Search.

6. Write a C program to implement the depth first search algorithm for a graph and analyse its time
complexity.

7. Develop a program to find the shortest paths to other vertices using Dijkstra’s algorithm.

8. Develop a program to implement Floyd’s algorithm for the All-Pairs- Shortest-Paths problem.
Page 1 of 2
9. Implement prims algorithm for finding the minimum spanning tree of an undirected graph.

10. Develop a program to find out the maximum numbers in a given list of n numbers using the divide
and conquer technique.

11. Implement the heap sort algorithm in C. Compare its performance with other sorting algorithms for
different input sizes.

12. Implement quick sort algorithm and analyse its time complexity.

13. Implement Traveling Salesperson problem and then solve the same problem instance using any
approximation algorithm and determine the error in the approximation.

14. Write a C program to Implement N Queens problem using Backtracking.

15. Implement randomized algorithms for finding the kth smallest number.

INTERNAL EXAMINER EXTERNAL EXAMINER

Page 2 of 2

You might also like