Welcome to my repository where I am taking on the challenge of solving all 150 algorithm problems listed on Neetcode.io. This project is a journey through various types of algorithmic challenges, and my primary goal is to deepen my understanding of algorithms and data structures. I'll be categorizing solutions based on the type of problem, such as stack, two pointers, dynamic programming, etc., to make it easier to navigate and learn.
This repository is organized by problem categories, each within its own directory. Within these directories, you will find the problem solutions related to that category. Here's the structure:
Arrays & Hashing/
Stack/
Two Pointers/
Dynamic Programming/
...and so on for each category
In each category folder, problems are organized with a consistent naming convention:
- A Solutions folder with each problem's solution named as
Problem_Name.py
- A README.md file in each category folder for a general explanation on the given category.
The problems are sourced from LeetCode and organized as per their categorization on Neetcode.io. Here’s a glimpse of the categories and problems:
Name | Leetcode ID | Difficulty | Description | Detailed Solution |
---|---|---|---|---|
Valid Anagram | 242 | Easy | Determine if two strings are anagrams. | Python |
Two Sum | 1 | Easy | Find indices of two numbers such that they add up to a specific target. | Python |
Group Anagrams | 49 | Medium | Group strings that are anagrams of each other. | Python |
Top K Frequent Elements | 347 | Medium | Find the k most frequent elements in an array. | Python |
Product of Array Except Self | 238 | Medium | Calculate the product of array elements except for the current element. | Python |
Valid Sudoku | 36 | Medium | Determine if a Sudoku board is valid. | Python |
Encode and Decode Strings | 271 | Medium | Design an algorithm to encode and decode a list of strings. | Python |
Longest Consecutive Sequence | 128 | Medium | Find the length of the longest consecutive elements sequence. | Python |
Name | Leetcode ID | Difficulty | Description | Detailed Solution |
---|---|---|---|---|
Valid Parentheses | 20 | Easy | Determine if parentheses are valid. | Python |
Min Stack | 155 | Easy | Design a stack that supports push, pop, top, and retrieving the minimum element. | Python |
Evaluate Reverse Polish Notation | 150 | Medium | Evaluate the value of an arithmetic expression in Reverse Polish Notation. | Python |
Generate Parentheses | 22 | Medium | Generate all combinations of well-formed parentheses. | Python |
Daily Temperatures | 739 | Medium | Wait how many days until a warmer temperature. | Python |
Car Fleet | 853 | Medium | Count car fleets reaching a destination. | Python |
Largest Rectangle in Histogram | 84 | Hard | Find the area of the largest rectangle in the histogram. | Python |
For a complete list of problems and detailed explanations, refer to the respective category folders and their README.md files.
- For Learning: Feel free to navigate through the directories to find solutions and explanations for different types of algorithm problems.
- For Contributions: If you would like to contribute, please read the
CONTRIBUTING.md
file for guidelines.
Contributions are welcome! If you'd like to add a solution, improve an existing one, or add explanations, please follow the guidelines outlined in CONTRIBUTING.md
.
- All problems are sourced from LeetCode.
- The categorization and problem list are based on Neetcode.io.
This repository is open-source and available under the MIT License.
Happy Coding!