[go: up one dir, main page]

0% found this document useful (0 votes)
368 views4 pages

DAA Lab Assignments

The document outlines assignments for students across 4 modules. [1] The modules focus on algorithms and data structures, divide and conquer algorithms, greedy algorithms, and graph algorithms. [2] Students are asked to write C++ programs to implement various algorithms and data structures like stacks, queues, sorting, and trees. [3] They also must analyze the best and worst case time complexities of each program.

Uploaded by

Kakon Dey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
368 views4 pages

DAA Lab Assignments

The document outlines assignments for students across 4 modules. [1] The modules focus on algorithms and data structures, divide and conquer algorithms, greedy algorithms, and graph algorithms. [2] Students are asked to write C++ programs to implement various algorithms and data structures like stacks, queues, sorting, and trees. [3] They also must analyze the best and worst case time complexities of each program.

Uploaded by

Kakon Dey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

DAA Lab Assignments

Module I

1. Write a program in C++ to find the greatest of three numbers and also calculate the worst case
complexity.

2. In a small company there are five salesman. Each salesman is supposed to sell three products.
Write a C++ program using a 2D array to print (i) the total sales by each salesman and (ii) total
sales of each item and also calculate the worst case complexity.

3. Write a program in C++ to calculate the sum of the first 10 numbers and also calculate the worst
case complexity.

4. Write a program in C++ to sum the series 1/2 + 2/3 +..........+n/n+1 and also calculate the worst
case complexity.

5. Write a program in C++ to implement push and pop operation in a Stack and also calculate the
worst case complexity.

6. Write a program in C++ to implement Enqueue and Dequeue in a Linear Queue and also
calculate the worst case complexity.

7. Write a program in C++ to implement FIFO list and also calculate the worst case complexity.

8. Write a program in C++ to implement Fibonacci Problem and also calculate the worst case
complexity.

9. Write a program in C++ to implement Enqueue and Dequeue in a Circular Queue and also
calculate the worst case complexity.

Module II

1. Write a program in C++ to implement Binary Search using Divide-and-Conquer method and also
calculate the best case and worst case complexity.

2. Write a program in C++ to implement Heap Sort using Divide-and-Conquer method and also
calculate the best case and worst case complexity.

3. Write a program in C++ to implement Merge Sort using Divide-and-Conquer method and also
calculate the best case and worst case complexity.

4. Write a program in C++ to implement Max-Heap Sort and also calculate the best case and worst
case complexity.

5. Write a program in C++ to implement Linear Search and also calculate the best case and worst
case complexity.

6. Write a program in C++ to read a sentence until a'.' is entered and also calculate the worst case
complexity.
7. Write a program in C++ to read a line until a newline character is entered and also calculate the
worst case complexity.

8. Write a program in C++ for Insertion Sort and also calculate the best case and worst case
complexity.

9. Write a program in C++ for Selection Sort and also calculate the best case and worst case
complexity.

10. Write a program in C++ to implement Quick Sort and also calculate the best case and worst
case complexity.

11. Write a program in C++ to implement Bubble Sort and also calculate the best case and worst
case complexity.

12. Write a program in C++ to implement optimal binary search tree and also calculate the best case
and worst case complexity.

Module III

1. Write a program in C++ to implement Coin Change Problem using Greedy method and also
calculate the best case and worst case complexity.

2. Write a program in C++ to implement Fractional Knapsack Problem using Greedy method and
also calculate the best case and worst case complexity.

3. Write a program in C++ to implement Huffman Code using Greedy method and also calculate the
best case and worst case complexity.

4. Write a program in C++ to implement 0/1 Knapsack Problem using dynamic programming and
also calculate the best case and worst case complexity.

5. Write a program in C++ to implement Travelling Salesman Problem using dynamic programming
and also calculate the best case and worst case complexity.

6. Write a program in C++ to implement Bellman Ford Algorithm using dynamic programming and
also calculate the best case and worst case complexity.

Module IV

1. Write a program in C++ to implement Breadth First Search (BFS) and also calculate the best
case and worst case complexity.
.
2. Write a program in C++ to implement Depth First Search (DFS) and also calculate the best case
and worst case complexity.

3. Write a program in C++ to implement Prim's Algorithm and also calculate the best case and
worst case complexity.
4. Write a program in C++ to implement Kruskal's Algorithm and also calculate the best case and
worst case complexity.

5. Write a program in C++ to implement 4-Queen Problem using backtracking method and also
calculate the best case and worst case complexity.

6. Write a program in C++ to implement Vertex Colouring Problem and also calculate the best case
and worst case complexity.

7. Write a program in C++ to implement Hamiltonian Circuit Problem and also calculate the best
case and worst case complexity.

Note: Write the algorithm for each of the program and also the implementation.
NOTICE

This is to inform all the students of BTech 3rd and 5th Semester Computer Science & Engineering
that the laboratory exams will be held on the details given below:

Paper Code Subject Name Date Time

CS312 Computer Organization and 12.11.2015 3:30 p.m.-5:30 p.m.


Architecture

CS513 Design and Analysis of Algorithm 07.11.2015 10:30 a.m.-12:30 p.m

Mrs.Nomi Baruah,
Asst. Prof.,Dept. of CSE,
DUIET,D.U.

Mr.M. Tiken Singh,


Asst. Prof.,i/c Dept. of CSE,
Dept. of CSE,
DUIET,D.U.

You might also like