Most problems would be solved in the sequence of the structure provided by
Blind 75,
Leetcode Beginner's study guide
Java, Python
Each problem lives in a folder named like so: ###. Problem Title
Inside each folder:
code.[py/java]: Coding implementation of the solutionREADME.md: Problem description and complexity analysis
Each readme includes:
- LeetCode link and problem number
- Difficulty level
- Example section
- Elaborated Steps solution
- Complexity analysis (Time & Space)
To quickly scaffold a new problem directory with boilerplate files, use the create_leetcode_problem.py automation script:
python create_leetcode_problem.py <problem_name> <leetcode_problem_link>
E.g:
python create_leetcode_problem.py "412. FizzBuzz" https://leetcode.com/problems/fizz-buzz/description/graph TD
A[Understand the Problem] --> B[Think of a solution without code, like a normal person would]
B --> C[Translate solution into Pseudocode]
C --> D[Design algorithm and choose optimal Data Struct]
D --> E{Passes Basic Tests?}
E -- No --> F[Optimize/Debug]
E -- Yes --> G[Time & Space Complexity Analysis]
F --> D
G --> H[Submit & Verify]