Sitemap
Steven Gong

Software Engineering student who enjoys writing articles and reflecting on miscellaneous life topics. Main website: https://stevengong.co/

Follow publication

Member-only story

How to Code on LeetCode from the Terminal

5 min readSep 30, 2021

--

Recently, I have been getting more and more into LeetCode because I am preparing to apply to various tech companies for summer internships.

However, while LeetCode offers a native editor for you to code the solution on, it was hard finding a working solution to be able to seamlessly code and submit from the terminal.

In this tutorial, I want to show you all how I managed to finally get a great working solution so you can use LeetCode from the terminal as well!

LeetCode is an online platform that hosts thousands of coding questions for software engineers to practice on. These questions have varying levels of difficulties and are related to solving problems about data structure and algorithms.

There are actually quite a few open-source projects that solve this exact problem, but many of them don’t work anymore (as of September 30th, 2021), since LeetCode recently changed the way their authentication worked. After hours of digging and trying out various of them, I finally found one that works really well and is still currently maintained (though I needed to go through a few extra steps to get it working).

Installation Guide

If you are on MacOS/Linux/Ubuntu, then the instructions below will work perfectly fine. However, if you are on Windows, I highly recommend you install WSL (Windows Subsystem for Linux), as it will make the installation process much simpler. I’ll link a guide here to installing WSL.

--

--

Steven Gong
Steven Gong

Published in Steven Gong

Software Engineering student who enjoys writing articles and reflecting on miscellaneous life topics. Main website: https://stevengong.co/

Steven Gong
Steven Gong

Written by Steven Gong

Waterloo Software Engineering student who enjoys writing articles and reflecting on miscellaneous life topics.

No responses yet