Back to the 2023 paper
Similar questions
Design and Analysis of Algorithms Which of the following sorting algorithms has the best time complexity in the average case? (i) Bubble sort (ii) Insertion sort (iii) Quick sort (iv) Selection sort20232mDesign & Analysis of AlgorithmsThe worst case running times of Insertion sort, Merge sort and Quick sort, respectively, are: - (i) \Theta(n \log n), \Theta(n \log n) and \Theta(n^2) - (ii) \Theta(n^2), \Theta(n^2) and \Theta(n \log n) - (iii) \Theta(n^2), \Theta(n \log n) and \Theta(n \log n) - (iv) \Theta(n^2), \Theta(n \log n) and \Theta(n^2)20242mDesign & Analysis of AlgorithmsAssume that the algorithms considered here sort the input sequences in ascending order. If the input is already in ascending order, which of the following is TRUE? I. Quicksort runs in \Theta(n^2) time II. Bubblesort runs in \Theta(n^2) time III. Mergesort runs in \Theta(n) time IV. Insertion sort runs in \Theta(n) time - (i) I and II only - (ii) I and III only - (iii) II and IV only - (iv) I and IV only20242mDesign and Analysis of Algorithms Write the algorithm for quick sort. Find the best-case, worst-case and average-case time complexities of this algorithm.20227m
PreviousWhich of the following algorithms is used to find the minimum spanning tree in a weighted undirected graph? (i) Dijkstra's algorithm (ii) Kruskal's algorithm (iii) Bellman-Ford algorithm (iv) Floyd-Warshall algorithmNextWhat is the complexity of T(n) = 2T(n/4) + n^2 \log n? (i) \Theta(n^2 \log(\log n)) (ii) \Theta(n^3 \log n) (iii) \Theta(n^2 \log n) (iv) \Theta(n \log n)