Skip to content

This is a comprehensive collection of solutions to various Data Structures and Algorithms (DSA) problems that I have encountered while learning and practicing. These solutions span challenges from LeetCode, other competitive programming platforms, and my own exploratory learning.

License

Notifications You must be signed in to change notification settings

GourangaDasSamrat/DSA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSA Solutions

LeetCode Sync Codeforces Sync License: MIT

A comprehensive collection of Data Structures and Algorithms solutions from competitive programming platforms, featuring automated synchronization and AI-powered complexity analysis.

Overview

This repository maintains an organized archive of solutions from multiple competitive programming platforms. Solutions from LeetCode and Codeforces are automatically synchronized daily via GitHub Actions, with complexity analysis powered by Google Gemini AI. Additional practice problems and manual submissions are organized in separate directories.

Automated Platforms: LeetCodeCodeforces

Manual Collections: ic-mern-b5 • Other Platforms

Features

Automated Solutions (LeetCode, Codeforces)

  • Automated Synchronization: Daily updates from platform APIs
  • Complexity Analysis: AI-generated time and space complexity with explanations
  • Performance Metrics: Runtime and memory usage tracking with visualizations
  • Comprehensive Documentation: Auto-generated README files for each problem
  • Version Control: Complete solution history and evolution tracking

Manual Collections

  • Organized Structure: Solutions grouped by topic or course
  • Learning Resources: Additional practice problems and exercises
  • Custom Implementations: Experimental and learning-focused code

Repository Structure

.
├── leetcode/                 # LeetCode solutions (automated)
│   ├── README.md            # Statistics and problem index
│   └── [problem]/           # Individual problem directories
│       ├── README.md        # Problem details and analysis
│       ├── solution.*       # Solution implementation
│       └── performance.png  # Performance visualization
│
├── codeforces/              # Codeforces solutions (automated)
│   ├── README.md            # Statistics and problem index
│   └── [problem]/           # Individual problem directories
│
├── ic-mern-b5/              # Additional practice problems
│   └── [solutions]/         # Manual submissions
│
├── [other-platforms]/       # Other coding challenges
│
├── scripts/                 # Automation scripts
│   ├── sync_leetcode.py
│   └── sync_codeforces.py
│
└── .github/workflows/       # CI/CD configuration
    ├── leetcode-sync.yml
    └── codeforces-sync.yml

Getting Started

Prerequisites

  • Python 3.8+
  • Git

Installation

# Clone the repository
git clone https://github.com/GourangaDasSamrat/DSA.git
cd DSA

# Install dependencies (for local development)
pip install -r requirements.txt

Browsing Solutions

Navigate to platform-specific directories:

# Automated platforms
cd leetcode     # LeetCode solutions (auto-synced)
cd codeforces   # Codeforces solutions (auto-synced)

# Manual collections
cd ic-mern-b5   # Additional practice problems

Automated directories contain a README.md with problem statistics and a complete index of solutions. Manual collections are organized by topic or course structure.

Automation Pipeline

Workflow

  1. Trigger: GitHub Actions scheduled workflows (daily at 00:00 UTC)
  2. Fetch: Retrieve accepted submissions via platform APIs
  3. Process: Extract solution code and metadata
  4. Analyze: Generate complexity analysis using Gemini AI
  5. Visualize: Create performance graphs with Matplotlib
  6. Document: Generate comprehensive README files
  7. Commit: Push updates to repository

Configuration

Automation requires the following GitHub Secrets:

LeetCode:

  • LEETCODE_SESSION: Session cookie from authenticated LeetCode session
  • LEETCODE_CSRF_TOKEN: CSRF token from LeetCode

Codeforces:

  • CODEFORCES_HANDLE: Codeforces username

Shared:

  • GEMINI_API_KEY: Google Gemini API key for complexity analysis

Tech Stack

Languages: Python, C++, Java, JavaScript

Automation: GitHub Actions, Python

APIs: LeetCode API, Codeforces API, Google Gemini AI

Visualization: Matplotlib

Version Control: Git

Topics Covered

Data Structures: Arrays, Linked Lists, Stacks, Queues, Trees, Graphs, Hash Tables, Heaps, Tries

Algorithms: Dynamic Programming, Greedy, Backtracking, Divide & Conquer, Graph Algorithms, Sorting, Searching

Advanced Topics: Bit Manipulation, Number Theory, Computational Geometry, String Algorithms

Contributing

This is a personal learning repository, but suggestions and improvements are welcome.

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/improvement)
  3. Commit your changes (git commit -am 'Add improvement')
  4. Push to the branch (git push origin feature/improvement)
  5. Open a Pull Request

Please ensure:

  • Code follows existing style conventions
  • Documentation is updated accordingly
  • All tests pass (if applicable)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

Gouranga Das

Acknowledgments

  • LeetCode for providing the platform and API
  • Codeforces for the competitive programming platform
  • Google Gemini AI for complexity analysis capabilities
  • GitHub Actions for automation infrastructure

Note: This repository is automatically updated. Solutions reflect personal approaches and may not represent optimal solutions for all cases.

About

This is a comprehensive collection of solutions to various Data Structures and Algorithms (DSA) problems that I have encountered while learning and practicing. These solutions span challenges from LeetCode, other competitive programming platforms, and my own exploratory learning.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •