Design and Analysis of Algorithms (CS2000) Previous Year Question Papers
9 RV University previous year question papers for Design and Analysis of Algorithms (CS2000), a semester 3 course: End-sem, Retest, Midterm, CIE 1 exams from 2024 to 2026. Read every question with its diagrams, or open the original scans. Also known as DAA, DAOA, ALGO.
Questions that appeared in more than one Design and Analysis of Algorithms exam, most repeated first.
If a graph contains a negative edge, how would the performance and results of Dijkstra's algorithm differ from those of the Bellman-Ford algorithm? Justify your answer. Asked 2 times: End-sem Dec 2025 Q2b, End-sem Jun 2026 Q2b
Consider the following table of jobs, each with an associated profit and deadline: Job J1 J2 J3 J4 J5 J6 J7 J8 J9 Profit 15 20 30 19 17 16 26 18 28 Deadline 4 2 5 3 6 3 2 7 4 Apply the job sequencing algorithm to determine the optimal job sequence and calculate the maximum pro… Asked 2 times: End-sem Dec 2025 Q3b, End-sem Jun 2026 Q3a
Which of the following sorting algorithm's time complexity is the most inefficient in the best-case?A. Merge sort B. Insertion Sort C. Quicksort D. Selection sort Asked 2 times: Midterm Oct 2024 Q1, Midterm Sep 2025 Q1
Suppose there are 8 sorted arrays of (n/8) elements each. If we merge these arrays into a single sorted array of n elements using two-way merge (merge two sub-arrays recursively), then how many key comparisons are needed in the worst-case using the merge algorithm? Note: Size … Asked 2 times: Midterm Oct 2024 Q2, Midterm Sep 2025 Q2
Apply BFS to the given graph with vertices {1, 2, 3, 4, 5, 6, 7}.Starting from vertex 'I',i) List all possible orders of vertices visited using the BFS algorithm.ii) Mention the total number of orders possible. Asked 2 times: Midterm Oct 2024 Q6, Midterm Sep 2025 Q8
Apply QuickSort to sort the following array in ascending order. Track the number of swaps at each iteration (step) and provide the final sorted array.[21, 19, 15, 7, 1, 5, 3, 12]Note: Mention clearly which index is being used as a pivot (first or last).Additionally, make sure … Asked 2 times: Midterm Oct 2024 Q8, Midterm Sep 2025 Q7
A certain permutation of integer stored in an array is provided as an input to the algorithm of quicksort. After one pass of algorithm the status of the array is 7, 16, 12, 13, 18, 15, 17, 23. Find the sum of all possible values that could have been used as a pivot . Asked 2 times: End-sem Dec 2024 Q2a, Midterm Sep 2025 Q4
Consider the following message: aabbbbabecdddccccbbdd Find the number of bits required for Huffman encoding of the above message. If Huffman tree coded as left child with '0' and right child with '1' from every node then what is the decoded message for 110100? Asked 2 times: End-sem Dec 2024 Q3a, End-sem Dec 2025 Q3c
Find the number of distinct minimum cost spanning trees for the following weighted graph. And draw all possible minimum cost spanning trees. Asked 2 times: End-sem Dec 2024 Q4b, Midterm Nov 2025 Q1
Consider the weights and values of items listed below. Note that there is only one unit of each item. Item Number Weight (in Kgs) Value (in Rupees) 1 3 60 2 5 30 3 4 20 4 3 22 The task is to pick a subset of these items such that their total weight is no more than 5 Kgs and th… Asked 2 times: End-sem Dec 2024 Q4, End-sem Jul 2025 Q2