Skip to content

About

Understand algorithms through Python implementations, step-by-step traces, correctness reasoning, and complexity analysis.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

🧩 Python Algorithm Lab

Understand algorithms through Python implementations, step-by-step traces, correctness reasoning, and complexity analysis.

Created by python_scripts (Abhijith Warrier).

Learn how algorithms solve problems, why they work, and when to use them. The focus is on reasoning about the method—not simply memorizing an implementation.


📚 Learning Roadmap

The following topics describe the planned scope of the series. This roadmap is not a list of already published notebooks.

Area Concepts
Searching and array techniques Binary search, two pointers, sliding windows, prefix sums, and Kadane’s algorithm.
Sorting and selection Insertion sort, merge sort, quicksort, counting sort, quickselect, and heap-based selection.
Greedy methods and dynamic programming Interval scheduling, coin change, knapsack, longest common subsequence, and edit distance.
Graphs and dependencies BFS, DFS, topological sorting, Dijkstra, Bellman–Ford, Union–Find, and minimum spanning trees.
Strings, backtracking, and streams KMP, Rabin–Karp, N-Queens, monotonic stacks, cycle detection, reservoir sampling, and running medians.

🚀 Getting Started

Once this repository and its notebooks are available, clone it:

git clone https://github.com/abhijithwarrier/Python-Algorithm-Lab.git
cd Python-Algorithm-Lab

Create and activate a virtual environment:

python -m venv .venv

macOS / Linux:

source .venv/bin/activate

Windows PowerShell:

.venv\Scripts\Activate.ps1

Install and launch JupyterLab:

python -m pip install jupyterlab
python -m jupyterlab

Use python3 instead of python where required by your system. Open a notebook and run its cells from top to bottom. Any topic-specific packages and Python-version requirements will be stated in that notebook; install packages using its dedicated installation section.


🔍 Learning Approach

Each implementation will state its preconditions and examine edge cases. Complexity discussions will distinguish worst-case, average-case, or amortized bounds where needed. Measured runtime is separate from theoretical complexity.

Run the example, change an input or assumption, and explain why the result changed. Keep the conceptual lesson connected to the code and its output.


👨‍💻 About the Series

Part of the python_scripts educational series: learning concepts by implementing and exploring them with Python.

Follow @python_scripts on Instagram for accompanying Reels and explanations.

Created by Abhijith Warrier

About

Understand algorithms through Python implementations, step-by-step traces, correctness reasoning, and complexity analysis.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages