Back to the 2023 paper
Similar questions
Design & Analysis of AlgorithmsIn linear search algorithm the worst case occurs when: - (i) the item is somewhere in the middle of the array - (ii) the item is not in the array at all - (iii) the item is the last element in the array - (iv) the item is the last element in the array or is not there at all20222mDesign & Analysis of AlgorithmsConsider the array A = \{26, 17, 41, 14, 21, 30, 47, 10, 16, 19, 21, 28, 38, 7, 12, 14, 20, 35, 39, 3\}. Create binary search tree with one more attribute its size of node. Retrieve 17th smallest element in the tree and rank the 12th element.201914mDesign & Analysis of AlgorithmsThe approach followed in Floyd Warshall's algorithm is - (i) Greedy approach - (ii) Dynamic approach - (iii) Backtracking - (iv) Divide and conquer20242mDesign & Analysis of AlgorithmsWrite the algorithm for quick-sort and find its complexity.20237m
PreviousWrite the step-by-step process of Quick Sort using an example. Write the advantages and disadvantages of Quick Sort compared to other sorting algorithms, such as Merge Sort and Bubble Sort.NextYou are a thief planning to rob a jewelry store. The store contains 7 items, each with a profit P and weight W as follows: | Object | 1 | 2 | 3 | 4 | 5 | 6 | 7 | |---|---|---|---|---|---|---|---| | Profit (P) | 5 | 10 | 15 | 7 | 8 | 9 | 4 | | Weight (W) | 1 | 3 | 5 | 4 | 1 | 3 | 2 | You have a knapsack with a weight capacity of 15. Apply the step-by-step greedy approach to obtain the maximum profit.