A comprehensive collection of LeetCode problem solutions implemented in Python, organized by topics and difficulty levels.
This repository contains solutions to various LeetCode problems covering multiple data structures and algorithms topics:
- Graph Day 1 - Connected Components (DFS, BFS, Union-Find)
- Graph Day 2 - BFS Solutions (Same Tree, Invert Tree, Symmetric Tree)
- Graph Day 3 - DFS Solutions (Same Tree, Invert Tree, Symmetric Tree)
- Graph Day 4 - Number of Provinces (DFS & BFS)
- 70. Climbing Stairs - Multiple approaches (Recursion, Memoization, Tabulation)
- 509. Fibonacci Number - DP solutions
- 416. Partition Equal Subset Sum
- 368. Largest Divisible Subset
- 1. Two Sum - Brute Force & HashMap approaches
- 53. Maximum Subarray - Kadane's Algorithm
- 73. Set Matrix Zeroes
- 88. Merge Sorted Array
- 135. Candy
- 918. Maximum Sum Circular Subarray
- 1191. K-Concatenation Maximum Sum
- 1331. Rank Transform of an Array
- 1979. Find Greatest Common Divisor of Array
- 2503. Maximum Number of Points From Grid Queries - Dijkstra's Algorithm
- 2780. Minimum Index of a Valid Split - Array manipulation
- 3169. Count Days Without Meetings - Interval merging
- 3375. Minimum Operations to Make Array Values Equal to K
- Easy: Two Sum, Climbing Stairs, Fibonacci, Merge Sorted Array, etc.
- Medium: Maximum Subarray, Set Matrix Zeroes, Graph problems, etc.
- Hard: Advanced DP and Graph problems
- Dynamic Programming: Climbing Stairs, Fibonacci, Partition Sum, etc.
- Graph Algorithms: DFS, BFS, Union-Find, Connected Components
- Array Manipulation: Two Sum, Maximum Subarray, Set Matrix Zeroes
- Greedy Algorithms: Candy Distribution, Processing Time
- Mathematical: GCD, Modular Arithmetic, Combinatorics
- Multiple Approaches: Many problems include multiple solution approaches (Brute Force, Optimized, Different Algorithms)
- Detailed Comments: Each solution includes problem description and explanation
- Time/Space Complexity: Analysis provided for optimal solutions
- Clean Code: Well-structured and readable Python implementations
This repository contains solutions to 25+ LeetCode problems covering:
- Graph Theory and Traversals
- Dynamic Programming Patterns
- Array and String Manipulation
- Mathematical Algorithms
- Tree and Binary Tree Problems
- Greedy Algorithms
- Game Theory and Simulation
- Clone the repository
- Navigate to specific problem files
- Each file contains:
- Problem statement
- Example test cases
- Solution implementation(s)
- Time and space complexity analysis
Start with: Two Sum → Climbing Stairs → Maximum Subarray → Merge Two Sorted Lists
Follow the Graph Day series (1-4) for comprehensive coverage of graph algorithms
Begin with: Fibonacci → Climbing Stairs → Partition Equal Subset Sum
Feel free to contribute by:
- Adding new solutions
- Improving existing solutions
- Adding alternative approaches
- Enhancing documentation
This project is open source and available under the MIT License.
Happy Coding! 🎯
Keep practicing and improving your problem-solving skills!