This repository contains implementations of various algorithmic problems, each organized in its own directory with comprehensive documentation and testing.
- Find and analyze ways to decompose numbers into sums of distinct perfect squares
- Implementation includes visualization of patterns and interactive interface
- View Details
- Implementation of Karatsuba's algorithm for large integer multiplication
- Comparison with grade school multiplication method
- Performance analysis and visualization
- View Details
- Calculate distance between permutations
- Efficient implementation without using sort operations
- View Details
- Find longest increasing sequence in a matrix with neighboring constraints
- Includes visualization with colored output
- View Details
- Find longest paths in directed acyclic graphs
- Handles various graph sizes with performance constraints
- View Details
- Count intervals in a list summing to a target value
- Efficient implementation without using Python's sum operator
- View Details
.
├── README.md
├── asd_assignment/ # Assignment 1
│ ├── src/
│ ├── tests/
│ └── README.md
├── integer_multiplication/ # Assignment 2
│ ├── src/
│ ├── tests/
│ └── README.md
├── kendall_tau/ # Assignment 3
│ ├── src/
│ ├── tests/
│ └── README.md
├── snake_matrix/ # Assignment 4
│ ├── src/
│ ├── tests/
│ └── README.md
├── longest_paths/ # Assignment 5
│ ├── src/
│ ├── tests/
│ └── README.md
└── interval_sum/ # Assignment 6
├── src/
├── tests/
└── README.md
- Python Environment Setup:
pip install matplotlib numpy tqdm- Running Tests:
python -m unittest discover -s <assignment_directory>/testsEach assignment has specific performance constraints:
- ASD: < 1 second for n ≤ 10^4
- Integer Multiplication: < 10 seconds for n ≤ 10^4
- Kendall Tau: ~ 1 second for n ≤ 10^5
- Snake Matrix: < 1 second for m,n ≤ 10^3
- Longest Paths: varies by graph size (1-10 seconds)
- Interval Sum: ~ 1 second for n ≤ 10^6
Each assignment directory contains:
- Source code with core implementation
- Test suite with comprehensive test cases
- Documentation with examples and analysis
- Visualization tools where applicable
Each assignment includes:
- Problem description
- Implementation details
- Example inputs/outputs
- Performance analysis
- Visualization (where applicable)
- Usage instructions
For detailed information about each assignment, refer to the README.md file in the respective assignment directory.