This repository contains implementations of classic algorithms in both Python and Java, starting with content from Tim Roughgardenโs Algorithms Illuminated and expanding to other sources over time.
It aims to provide clear explanations, step-by-step derivations, and performance analysis of fundamental algorithms.
algorithms-in-python-and-java/ โโโ python/ โ โโโ multiplication/ โ โ โโโ multiplication_algorithms_final.ipynb โ โโโ sorting/ โ โโโ sorting_algorithms_top10.ipynb โโโ java/ โโโ notes/
-
multiplication_algorithms_final.ipynb
๐ Multiplication Algorithms Comparison:- โ๏ธ Grade-School Multiplication
- ๐ Recursive Integer Multiplication (RecIntMult)
- โก Karatsuba Multiplication
- ๐ Toom-Cook 3-Way Multiplication (educational simple version)
- ๐ FFT-Based Multiplication (basic polynomial convolution view)
Includes:
- ๐ Mathematical derivations and intuition
- ๐งฉ Full Python implementations
- โฑ Timing experiments with random integers
- ๐ Log-log performance plots and complexity analysis
-
sorting_algorithms_top10.ipynb
๐ Sorting Algorithms Exploration:- ๐งน Simple Sorts (Insertion Sort, Shell Sort)
- โ๏ธ Divide and Conquer Sorts (Merge Sort, Quick Sort)
- ๐ Heap-Based Sorts (Heap Sort, IntroSort)
- ๐งฎ Non-Comparison-Based Sorts (Counting Sort, Radix Sort, Bucket Sort)
Includes:
- ๐ Detailed algorithm descriptions with real-world examples
- ๐งฉ Full Python implementations
- โฑ Benchmarking experiments from n = 100 to 1000
- ๐ Log-log performance plots with fitted slopes for empirical complexity analysis
- Expanding into sorting, searching, graph algorithms, dynamic programming, etc.
- Adding Java implementations alongside Python.
- More educational content focused on learning algorithms deeply.
Build a self-contained educational resource for students, researchers, and anyone interested in mastering algorithms both theoretically and practically.