Follow these guidelines to contribute to this repository of Leetcode questions and solutions:
- Match the casing of files and directories.
- Title your PR accurately and succinctly (e.g., "Create: 1-Two-Sum.py").
- Ensure your code passes the submission on leetcode.com for the problem it solves.
- Write clean, easy-to-understand code by using meaningful variable/method names, maintaining a consistent style, etc. Avoid using single letters as variable names, as they lack semantic meaning.
- Check if the problem is already solved in the language you're contributing in.
For each problem level, follow these steps to add your solution:
- If the README table for that level doesn't have a column for your solution's language, add one and link your solution in that column.
- If the table already has a column for your language, just link your solution and ensure the problem hasn't been solved already.
Q: What if there are multiple ways to solve the problem?
A: Choose the best solution based on time and memory complexity.
If there are multiple optimal solutions, you can either choose one, or add all solutions in the same file, keeping only one solution uncommented. Please include a comment above each solution describing the approach technique/algorithm (e.g., two pointers, HashMap, BFS, etc.).