A small educational repository that collects essential Python algorithms grouped by topic.
This project is designed for learning and practicing:
- basic programming concepts,
- searching techniques,
- sorting algorithms,
- and classic mathematical problems.
Each file includes simple, readable implementation examples and brief explanatory comments.
python-fundamental-algorithms/
├── basics/
│ ├── max_min.py
│ ├── reverse_number.py
│ └── sum_numbers.py
├── searching/
│ ├── binary_search.py
│ └── linear_search.py
├── sorting/
│ ├── bubble_sort.py
│ ├── insertion_sort.py
│ └── selection_sort.py
├── mathematics/
│ ├── factorial.py
│ ├── fibonacci.py
│ └── prime_check.py
└── README.md
max_min.py— finds the smallest and largest values in a list.reverse_number.py— reverses the digits of an integer.sum_numbers.py— computes the sum of numbers in a collection.
linear_search.py— checks each item one by one.binary_search.py— efficiently searches a sorted list by splitting the search range.
bubble_sort.py— repeatedly swaps adjacent out-of-order elements.selection_sort.py— selects the minimum remaining element and places it in the correct position.insertion_sort.py— inserts each element into its correct spot in a sorted list.
factorial.py— calculates the factorial of a non-negative integer.fibonacci.py— generates the Fibonacci sequence value at the requested position.prime_check.py— determines whether a number is prime.
You can run any script directly with Python:
python basics/sum_numbers.py
python searching/binary_search.py
python sorting/bubble_sort.py
python mathematics/fibonacci.py- The code is intentionally simple and beginner-friendly.
- Each algorithm focuses on clarity and understanding over optimization.
- You can use this repository as a practice base for interview-style problem solving and algorithm review.