Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Sorting Problems

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.

Structure

  • 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)

File Organization

Each difficulty level contains:

  • README.md: Explains the structure and usage
  • questionX.txt: Problem statement with source link
  • answerX.py: Clean, type-safe Python solution with docstring

Usage

  1. Start with basic problems and progress to advanced.
  2. Read the problem statement in questionX.txt.
  3. Try solving it yourself before checking the solution.
  4. Review the type-safe solution in answerX.py.
  5. All solutions include docstrings and example usage.