A curated collection of solutions to LeetCode, Codeforces, HackerRank, and other competitive programming challenges. Focused on efficiency, readability, and best practices for coding interviews and competitions.
This repository contains optimized solutions to algorithmic problems from popular coding platforms. Each solution includes:
- Clean, well-commented code
- Time & space complexity analysis
- Approach explanations
- Test cases (where applicable)
Perfect for developers preparing for coding interviews or improving their problem-solving skills!
- Platform Coverage:
- LeetCode
- Codeforces
- HackerRank
- GeeksforGeeks
- Languages:
- Python (Primary)
- Java
- C++
- JavaScript
- Topics:
- Arrays & Strings
- Dynamic Programming
- Graphs & Trees
- Greedy Algorithms
- System Design (OOD)
CompetitiveCode/
├── LeetCode/
│ ├── Easy/
│ │ └── Two_Sum.py
│ ├── Medium/
│ │ └── Add_Two_Numbers.py
│ └── Hard/
│ └── Trapping_Rain_Water.py
├── Codeforces/
│ └── Round_789/
│ └── Problem_A.cpp
├── HackerRank/
│ └── SQL/
│ └── Weather_Observation.sql
└── Resources/
└── Big_O_Cheatsheet.pdf
- Search for a Problem:
- Use GitHub’s search bar (e.g.,
Two_Sum.py
).
- Use GitHub’s search bar (e.g.,
- Understand the Approach:
- Read code comments and complexity analysis.
- Run Locally:
git clone https://github.com/Amit006/CompitiveCode.git cd CompitiveCode/LeetCode/Medium python3 Add_Two_Numbers.py
Contributions are welcome! Follow these steps:
- Fork the repository.
- Add your solution in the relevant folder (e.g.,
LeetCode/Medium
). - Include:
- Problem statement link (replace with your problem URL)
- Approach explanation
- Time/space complexity analysis
- Submit a pull request.
Guidelines:
- Follow PEP8 for Python.
- Use descriptive variable names.
- Add test cases if possible.
This project is licensed under the MIT License. See LICENSE for details.
- Inspired by LeetCode Discuss and Codeforces Community.
Happy Coding! ✨
Let’s connect on LinkedIn.