An official Trane course for learning to solve LeetCode problems. The questions were selected from neetcode.io. Shout out to them for going over the work of organizing a subset of Leetcode questions by topic and difficulty. You can watch a video answer for all the questions in these courses on their site.
- Install trane-cli on your computer. This is the command line interface for Trane.
- Clone or download this repository to your computer.
- Go to the directory where you downloaded this repository and run
trane
. You will be presented with the command line interface for Trane. - Run the command
open ./
to load the courses into Trane. - Run the command
next
to show the next question. Each question is just a text file telling you to solve a specific problem along with its URL. - Once you have solved the problem (see below on what that means), you can set a score from 1 to
5 by running the command
score <score>
. Runningscore
multiple times will update the score, and it is only submitted when you request a new question. - Run
next
to show the next question.
As you progress through the first exercises, Trane will automatically move on to questions of a higher difficulty while also reminding you to review questions you have seen before.
For more documentation, see the official docs.
Unlike an exercise asking you to perform a piece of music or to solve a chess puzzle, the problems in these courses are more open-ended. What solving the problem means is up to you. You could force yourself to code the solution from scratch every time you are shown a problem, but this could get old soon. You could also code it the first time, and just draft a solution in pseudocode afterwords. Or you could simply review the solution and assign yourself a score based on how much of it you remembered.
If you are stuck on a problem, it's OK to look at the solution. Just make sure you assign yourself a low score (1 or 2).
If you notice an issue with the courses (a bad URL for example), please open an issue or a PR on GitHub.