This directory contains a collection of sorting problems organized by difficulty level. Each problem includes a detailed problem statement and a clean, type-safe Python solution.
-
basic/: Non-trivial sorting problems from GeeksforGeeks- Reverse an Array in groups of given size
- Sort an array of 0s, 1s and 2s
- Merge Without Extra Space
-
moderate/: Hard sorting problems from LeetCode- Wiggle Sort II (LeetCode 324)
- Count of Smaller Numbers After Self (LeetCode 315)
- Find Median from Data Stream (LeetCode 295)
-
advanced/: Very hard/extremely hard sorting problems from LeetCode- Median of Two Sorted Arrays (LeetCode 4)
- Count of Range Sum (LeetCode 327)
- Reverse Pairs (LeetCode 493)
Each difficulty level contains:
README.md: Explains the structure and usagequestionX.txt: Problem statement with source linkanswerX.py: Clean, type-safe Python solution with docstring
- Start with basic problems and progress to advanced.
- Read the problem statement in
questionX.txt. - Try solving it yourself before checking the solution.
- Review the type-safe solution in
answerX.py. - All solutions include docstrings and example usage.