SortieralgorithmenIntermediate

Quick Sort

Ein hocheffizienter Sortieralgorithmus, der ein Pivot-Element auswahlt und das Array mit kleineren Werten links und grosseren rechts partitioniert. Durchschnittlich O(n log n) und die am weitesten verbreitete Sortiermethode in der Praxis. Bildet die Grundlage der eingebauten Sortierfunktionen in den meisten Programmiersprachen.

#sorting#divide-and-conquer#in-place

Complexity Analysis

Time (Average)

O(n log n)

Expected case performance

Space

O(log n)

Memory requirements

Time (Best)

O(n log n)

Best case performance

Time (Worst)

O(n²)

Worst case performance

📚 CLRS Reference

Introduction to AlgorithmsChapter 7Section 7.1

Step: 1 / 0
500ms
SlowFast
Keyboard Shortcuts
Space Play/Pause StepR Reset1-4 Speed

Real-time Statistics

Algorithm Performance Metrics

Progress0%
Comparisons
0
Swaps
0
Array Accesses
0
Steps
1/ 0

Algorithm Visualization

Step 1 of 0

Initialize array to begin

Default
Comparing
Swapped
Sorted

Code Execution

Currently executing
Previously executed

Implementation

Quick Sort - Algorithm Vision | Algorithm Vision