Which algorithm design approach is used in the quick sort algorithm?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: C. Divide and conquer
Explanation
Quick sort partitions around a pivot and recursively sorts the two parts: divide and conquer.More Data Structures and Algorithms questions
- Consider a hash table of size 11 that uses open addressing with linear probing, with h(k) = k mod 11. Records with keys 43, 36, 92, 87, 11,…
- Consider the traversals of a tree: Preorder → ABCEIFJDGHKL Inorder → EICFJBGDKHLA Which of the following is the correct postorder traversal?
- How many rotations are required during the construction of an AVL tree if the following elements are inserted in the given sequence? 35, 50…
- Consider the following undirected graph with vertices a, b, c, f, g, h and edges: a–b, a–c, a–f, b–c, b–f, b–h, c–g, f–g, f–h, g–h The foll…
- Consider the following algorithms and their running times. Which one of the following is correct?List I List II A. Breadth-first search I.…
- Consider the following statements on approximation algorithms: Statement I: APPROX-VERTEX-COVER is a polynomial-time 2-approximation algori…