Consider the following table:
Match the algorithms to the design paradigms they are based on.
View worked solution
Answer: C
To find the correct match, let us analyze the design paradigm of each algorithm:
-
(P) Kruskal's Algorithm:
This algorithm finds the Minimum Spanning Tree (MST) of a connected, weighted graph by greedily selecting the minimum weight edge that does not form a cycle.
-
(Q) Quicksort:
This sorting algorithm works by partitioning an array into two sub-arrays around a pivot element, and then recursively sorting the sub-arrays. This is a classic example of splitting a problem into smaller subproblems.
-
(R) Floyd-Warshall Algorithm:
This algorithm computes the shortest paths between all pairs of vertices in a weighted graph. It builds the solution bottom-up by utilizing optimal substructure and overlapping subproblems.
Combining these matches, we get:
Hence, the correct option is C.
Free practice · Your answers on this page are not saved.
