Thanks to visit codestin.com
Credit goes to github.com

Skip to content

jaydeepc/deepc-coding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithm Assignments Collection

This repository contains implementations of various algorithmic problems, each organized in its own directory with comprehensive documentation and testing.

Assignments Overview

1. Additive Square Decompositions (ASD)

  • Find and analyze ways to decompose numbers into sums of distinct perfect squares
  • Implementation includes visualization of patterns and interactive interface
  • View Details

2. Integer Multiplication

  • Implementation of Karatsuba's algorithm for large integer multiplication
  • Comparison with grade school multiplication method
  • Performance analysis and visualization
  • View Details

3. Kendall Tau Distance

  • Calculate distance between permutations
  • Efficient implementation without using sort operations
  • View Details

4. Longest Increasing Snake

  • Find longest increasing sequence in a matrix with neighboring constraints
  • Includes visualization with colored output
  • View Details

5. Longest Paths in DAGs

  • Find longest paths in directed acyclic graphs
  • Handles various graph sizes with performance constraints
  • View Details

6. Counting Intervals

  • Count intervals in a list summing to a target value
  • Efficient implementation without using Python's sum operator
  • View Details

Project Structure

.
├── 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

General Requirements

  1. Python Environment Setup:
pip install matplotlib numpy tqdm
  1. Running Tests:
python -m unittest discover -s <assignment_directory>/tests

Performance Requirements

Each 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

Implementation Notes

Each assignment directory contains:

  1. Source code with core implementation
  2. Test suite with comprehensive test cases
  3. Documentation with examples and analysis
  4. Visualization tools where applicable

Documentation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages