Pravin's Blog

Automatically Contribute Leetcode Solutions to Github

Wed Apr 27, 2022

If you are a fresh graduate or entry-level Software developer/engineer, you have most likely already heard or been told to practice coding problems to prepare for technical interviews. You would have also heard that employers would like to see your personal projects and contributions to open source hosting platforms such as Github.

I had been told the same thing when I started breaking into the industry and quickly realised that I couldn’t do both at the same time. When I found myself preparing for interviews, my Github code contributions decreased, giving the impression to recruiters that I hadn’t been programming at all. On the other hand, when I was focusing on my personal projects and committing often to Github, my problem-solving ability in technical interviews lagged behind.

It is important to focus your efforts on both of these aspects during your job hunt and upskilling process. This is because doing coding problems will have a greater focus on building your logic, data structures, algorithms and problem solving with your chosen language, while side projects will teach you the remaining skills required to be a software engineer i.e. git/version-control, research, project/time management, communication and program/architecture design.

You may now say that more effort should be put into personal projects since you’ll be doing things that are more related to the position you’re applying for. However, if you’re looking to break into bigger tech companies with more competition, they are most likely to have multiple rounds of technical interviews that have a greater influence on the final decision. This preparation cannot be neglected as it’s a different type of skill that you will need to learn to push past that final obstacle and land the job.

I wanted to fill the commit gaps created by interview preparation on my GitHub contributions page by committing my code solutions from LeetCode - the most well-known platform used to prepare for technical interviews. Doing this will improve your coding skills and indirectly build your portfolio, showing employers that you code and contribute often.

This was a very time consuming and daunting task until now when I recently found a tool that can automate this whole process.

Introducing - LeetHub

LeetHub is a Google Chrome extension, which automates the whole process of contributing your successful LeetCode Solutions to GitHub. To get this synced up you simply have to install the extension, authorize with Github and select an existing or create a new repository for your submissions to be pushed up to. Once that is done, you can be on your way and begin Leetcoding!

The tool will add a folder with the name of the problem to the chosen repository. The folder contains the file with your solution code, and two markdown files. One for any notes that you may want to add later, and the other markdown file containing the problem description.