This directory contains clean, to-the-point references and implementations of fundamental algorithms in Python, designed for Competitive Programming (CP) and Data Structures & Algorithms (DSA).
Sorting algorithms arrange elements of a list in a specific order (typically ascending or descending).
Currently documented algorithms:
- Bubble Sort: bubble_sort.py - Simple adjacent swap-based sorting algorithm.
- Selection Sort: selection_sort.py - Simple minimum-selection sorting algorithm.
- Insertion Sort: insertion_sort.py - Simple insertion-based sorting algorithm.
- Merge Sort: merge_sort.py - Divide and Conquer-based stable sorting algorithm.
- Quick Sort: quick_sort.py - Partition-based fast sorting algorithm.
Searching algorithms locate the position of a target element within a collection.
Currently documented algorithms:
- Linear Search: linear_search.py - Sequential search on unsorted/sorted collections.
- Binary Search: binary_search.py - Logarithmic search on sorted arrays, implemented iteratively and recursively.
algorithms/
├── README.md
├── 01_sorting/
│ ├── README.md
│ ├── bubble_sort.py
│ ├── insertion_sort.py
│ ├── merge_sort.py
│ ├── quick_sort.py
│ └── selection_sort.py
├── 02_searching/
│ ├── README.md
│ ├── binary_search.py
│ └── linear_search.py
├── 03_greedy/
├── 04_backtracking/
├── 05_dynamic_programming/
├── 06_graph_algorithms/
└── 07_string_algorithms/