-
Use branch clean for starting fresh and using the included script to create your own problems.
-
Use branch base (not included yet) to start solving the problems provided
- Run
dotnet test
from the root directory to test the whole project - Run
cd {PROBLEM_NAME} && dotnet test
to test a problem individually - Write your solutions in
{PROBLEM_NAME}/{PROBLEM_NAME}.cs
- Add more tests in
{PROBLEM_NAME}.Tests/{PROBLEM_NAME}Tests.cs
- Run
-
The main branch includes all of my solutions.
Note: I created a blogpost about how I made this repo and give instructions on how you can create one too.
- Valid Palindrome LC #125
- Valid Parentheses LC #20
- Best Time to Buy & Sell Stock LC #121
- LRU Cache LC #146
- Maximum Subarray LC #53
- Course Schedule LC #207
cs-neetcode/
│
├── TwoSum/
│ ├── TwoSum.cs
│ └── TwoSumTests.cs
│
├── ValidAnagram/
│ ├── ValidAnagram.cs
│ └── ValidAnagramTests.cs
│
├── Etc.../
│
├── cs-neetcode.sln
└── .gitignore
Be sure to make add_problem.sh executable:
chmod +x add_problem.sh
Run it with ./add_problem.sh
Input your leetcode problems name.
You can test the entire repository by running the following command from the root directory of the project.
dotnet test -v q
This will run the tests with minimal terminal output.
To test an individual leetcode solution, run the same command from the corresponding directory.
For example:
TwoSum.Tests/
cd TwoSum.Tests
dotnet test