Skip to content

feat: add quick sort algorithm

Yun.Long requested to merge wip/add-quicksort into main

Closes #6 (closed) - Add quick sort algorithm with median-of-three pivot selection

Changes

  • Implement quick_sort with median-of-three pivot selection
  • Add comprehensive test coverage
  • Update demo to include quick sort
  • Time complexity: O(n log n) average, O(n²) worst
  • Space complexity: O(log n)

Test Results

All 50 tests passed

Files Changed

  • main.py: Add quick_sort to demo
  • sort.py: Implement quick_sort algorithm
  • test_sort.py: Add quick_sort tests

Merge request reports