This repository contains my solutions to some of the problems from LeetCode. The solutions are organized by problem categories.
- Clone the repository:
git clone https://github.com/lynxrv21/leetcode.git
- Get random problem to solve:
Optionally, specify complexity or specific problem name:
python generate_problem.py
python get_problem.py [-h] [-c {easy,medium,hard}] [-p PROBLEM]
- New template file will be generated, with problem description and test cases
leetcode/
├── arrays
│ ├── 001_two_sum.py
│ ├── 015_3sum.py
│ ├── 121_best_time_to_buy_and_sell_stock.py
│ ├── 217_contains_duplicate.py
│ ├── 242_valid_anagram.py
│ └── utils.py
├── linked_lists
│ ├── 002_add_two_numbers.py
│ ├── 021_merge_two_sorted_lists.py
│ ├── 141_linked_list_cycle.py
│ ├── 206_reverse_linked_list.py
│ └── utils.py
├── stack
│ └── 020_valid_parentheses.py
├── trees
│ ├── 100_same_tree.py
│ ├── 104_maximum_depth_of_binary_tree.py
│ ├── 226_invert_binary_tree.py
│ └── utils.py
├── two_pointers
│ └── 125_valid_palindrome.py
├── Makefile
├── README.md
├── get_problem.py
├── leetcode.py
└── run_tests.py
- 001_two_sum.py *
- 015_3sum.py **
- 121_best_time_to_buy_and_sell_stock.py *
- 217_contains_duplicate.py *
- 242_valid_anagram.py *
- 002_add_two_numbers.py **
- 021_merge_two_sorted_lists.py *
- 141_linked_list_cycle.py *
- 206_reverse_linked_list.py *
NeetCode - coding challenges and some courses
System Design Primer - Guide to system design interviews
TechDummies - System design video guides
gkcs - Another system design and algorithms YT channel
Grokking the System Design Interview - Online course (paid)
Contributions are welcome! If you have solutions or improvements to existing ones, feel free to submit a pull request. Please check the code before submitting:
python run_tests.py
pip install black ruff
make fmt