DSA preparation using Leetcode and Notion
2 min read
Hi, there. If you're great at solving DSA problems and remembering the concepts and patterns long after solving such a problem, this post is not for you. If you keep forgetting the concepts and patterns used in a problem, if you have been unable to solve a question, you've previously solved, when you faced the same in a contest or interview, then keep reading.
We're going to use a well-known studying technique spaced repetition.
A Leetcode account (link)
A Notion account (link)
Ensure that python3 and pip are installed in the environment.
Clone this repo: LC_Notion python branch
git clone https://github.com/Azanul/LC_Notion.git git checkout python
You'll find a file named
testenvin the folder. Open it.
We need to fill these three fields to get the script to work. Let's start with
lc_username. Simply copy your Leetcode username and append it to the first row (after
Go to https://www.notion.so/my-integrations. Log in to your Notion account.
You'll be on this screen now. Click on create a new integration.
Fill out the form as shown below. You are free to put anything in the "Name" and "Logo" fields. Click on Submit.
A new integration has been created by the name you entered. Click on it. I created it with the name
Click on show under secrets then click on copy (or copy it yourself, who am I to judge).
Now append the copied text in the 2nd row (after
Go to this link (LC Spaced Repetition Template).
Click on Duplicate and choose the same Notion workspace you chose in step 7.
The template has been cloned to your Notion workspace. Now just copy the text right after notion.so and before? and paste it into the 3rd row of our
testenvfile (right after
Now rename the file
test.env. Now you must have your env file something like this. Finally! we're all done with the setup.
Running the script
If you're using Linux/MacOS use
run.sh and if you're on Windows use
run.bat. Simply run the file in the terminal/command prompt as instructed below.
Check out the template you duplicated, Last 15 questions that you solved on Leetcode have been updated.
Comment down below if you have any questions or requests.
Did you find this article valuable?
Support Azanul Haque by becoming a sponsor. Any amount is appreciated!