Apply Quick sort on a given sequence 7 11 14 6 9 4 3 12. What is the sequence after first phase, pivot is first element?
A. 6 4 3 7 11 9 14 12
B. 6 3 4 7 9 14 11 12
C. 7 6 14 11 9 4 3 12
D. 7 6 4 3 9 14 11 12
Answer: Option B
A. 6 4 3 7 11 9 14 12
B. 6 3 4 7 9 14 11 12
C. 7 6 14 11 9 4 3 12
D. 7 6 4 3 9 14 11 12
Answer: Option B
What is the time complexity of Bubble Sort in the average case?
A. O(n log n)
B. O(n)
C. O(n2)
D. O(n3)
Which sorting algorithm is based on the divide-and-conquer strategy?
A. Insertion Sort
B. Quick Sort
C. Selection Sort
D. Insertion Sort
Which sorting algorithm uses a "pivot" element to partition the array into sub-arrays?
A. Merge Sort
B. Heap Sort
C. Counting Sort
D. Quick Sort
Join The Discussion