Welcome to my LeetCode Java repository! This collection of solutions is intended to tackle a wide range of algorithmic challenges on LeetCode, starting from easy-level problems to progressively harder ones. This journey is designed to improve my understanding of data structures, algorithms, and problem-solving techniques in Java.
Each solution is organized by problem difficulty and follows the LeetCode problem list order for easy navigation. The structure is as follows:
-
Easy: Beginner-level problems that cover basic concepts and help build foundational skills. These problems are aimed at honing basic programming logic, syntax, and understanding of fundamental data structures like arrays, strings, and hashmaps.
-
Medium and Hard: As I progress, these sections will be added, covering advanced topics like dynamic programming, backtracking, graph algorithms, and more. Solutions in these folders will be explained in detail to help solidify understanding.
S# | Question# | Difficulty | Questions | Solutions |
---|---|---|---|---|
01 | 771 | Jewels and Stones | Jewels and Stones | |
02 | 520 | Detect Capital | Detect Capital |
S# | Question# | Difficulty | Questions | Solutions |
---|---|---|---|---|
01 | 771 | Jewels and Stones | Jewels and Stones | |
02 | 520 | Detect Capital | Detect Capital |
Each problem solution is saved in its respective folder, named after the problem title with its difficulty level in the folder name. For example:
.
├── easy
│ ├── _1_TwoSum
│ └── _2_ReverseInteger
└── medium
└── _1_AddTwoNumbers
Within each folder:
Problem.md
: Contains the problem description, constraints, and sample inputs/outputs.Solution.java
: The Java file with a clean, commented solution.Explanation.md
: (Optional) A detailed explanation of the approach, complexities, and any alternative solutions if applicable.
To use this repository, clone it, navigate to the desired problem folder, and compile and run the Java solution files:
javac Solution.java
java Solution
Each solution is standalone, so you can run them individually to see how they work.
Ensure you have Java installed to compile and run the solutions:
java --version
If you'd like to contribute, feel free to fork this repository, work on a new solution or improve existing ones, and create a pull request. Your contributions are welcome!
This repository is managed by:
- Pirate Coderz (Owner) - Java Developer and Competitive Programmer
- Pro Coder