paint-brush
A Chrome Extension to Code Daily with LeetCodeby@akumar5
2,427 reads
2,427 reads

A Chrome Extension to Code Daily with LeetCode

by Ashish KumarOctober 14th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Built to motivate you to solve a coding problem daily, as simple as name of the extension Code Daily with LeetCode. You can either solve a preselected question or choose from any topic and difficulty of your choice. To keep track of my progress, I decide to tweet everyday with the details of the questions/problems that I solved. You can view my tweets on twitter. The extension will select a problem randomly based on the topic and the difficulty set by me or randomly suggest me everyday. I'm glad that I picked this project, learnt a lot from it.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - A Chrome Extension to Code Daily with LeetCode
Ashish Kumar HackerNoon profile picture


I built a Chrome extension based on LeetCode to motivate you to solve a daily coding problem. You can either solve a preselected question or choose from any topic and difficulty of your choice.

How did I build it?

Recently, I decided to code a problem daily for 100 continuous days, without a single day off. While I'm writing this article, I have already reached my 50th day. To keep track of my progress, I decided to tweet the details of the questions/problems that I solved daily. You can view my tweets on Twitter.


https://twitter.com/meashishkmr


Every day, I used to go to LeetCode and select a problem to solve, then I had an idea. Why not develop a chrome extension? The chrome extension will select a problem randomly based on the topic and the difficulty set by me or randomly suggest me every day.


One of the main hurdles during the development process was that LeetCode doesn't have any API docs nor do they mention anywhere how to use them.


Out of curiosity, I first opened the Network tab on the console and look at all the endpoints that The LeetCode page call and after some research, found that they use GraphQL under the hood and their API's are open. Did some reverse engineering and constructed the API endpoints myself, it was fun as well as interesting


LeetCode endpoint on postman to get all the questions for a topic(e.g Array)

I'm glad that I picked this project, learned a lot from it. You can find the source code of the extension on my GitHub.


Source code for the extension

https://github.com/Ashi-s/leetcode-chrome-extension


Thanks for reading this article, If you have a suggestion that would make this chrome extension better, feel free to open a PR or you can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

Happy Coding!!!