§ 02 — Data Structures and Algorithms
Quick sort is a divide-and-conquer sorting algorithm. It chooses a value called a pivot, partitions the list around that pivot, and then recursively sorts the smaller partitions.
After partitioning:
A quick sort implementation may choose:
The partition step is the key part of quick sort. Given a pivot, the algorithm rearranges the array so the pivot is placed where it belongs in the sorted order.
Example:
Original: {10, 3, 30, 25, 48, 4, 36}
Sorted: {3, 4, 10, 25, 30, 36, 48}
Quick sort reaches the sorted result by repeatedly partitioning smaller sections of the list.
02 — Activity 13: Java Quick Sort ProgramPro reviewer — not included in this printout.
ProReviewer — locked
Part of this subject's paid reviewers.
Done with this module? Track it — your progress shows on the subject list.
Studying with blockmates? Send them this lesson.
End of this subject