<-back
02/09/2024
How I Leetcode
Leetcode is one of the most popular platforms to practice datastructures and algorithms. Its a great tool for practicing your technical interview skills and its like the gym for programmers. Here is how I use Leetcode.
Intro
I feel like an event called “the Leetcode epiphany” is a rite of passage for CS majors. No matter what grade level you may be, no matter where you are in your computer science journey, the term “Leetcode” haunts
computer majors from when they start til they get their dream job. Leetcode is recognized as THE platform to practice technical interview problems and get better at data structures and algorithms. A lot of people hate
studying data structures and algorithms and view it as a chore, because they either don’t enjoy the topic or don’t know where to start with studying dsa. Despite it being such an unenjoyable part of CS, technical
questions are a prominent part of the interviewing process and is an interviewing technique that many companies employ to evaluate candidates. This is how I study Leetcode and some of the resources and techniques I
used in my journey to getting my dream job.
Why?
Starting is really hard, as it is with starting anything. Learning new algorithms and datastructures is very rewarding because you are able to apply previously learned techniques to future problems. Leetcoding is also
the ultimate puzzle game, if looking at it that way helps to motivate you to get started. Sometimes during the interviewing process, you have to pass a preliminary coding test before you talk to a human being. Currently,
the job hiring process is pretty progressive, especially for internships, in the sense that companies look for people that show an enthusiasm and the ability to learn things because companies usually have a proprietary
tech stack that they can teach you on the fly. They value people that can work well with others and are a good fit for their company culture. This is why Leetcode is important, but if you are trash it isn’t the end of
the world. It’s also why it is important to learn the algorithms and data structures in detail so you can discuss it to great lengths, despite not being able to finish a problem.
Methodologies
I always start big projects by lubricating myself up to the overarching ideas by consuming random media on platforms that I enjoy such as Youtube and blog sites like the Verge or GeeksforGeeks. Take the advice that
content creators give you with a grain of salt though; everyone is different and you need to find what works for you. Then, I graduate to a track, or a study plan that I can adhere to. There are a lot of user-curated
ones online. My favorite is Neetcode.io, and I am planning to buy his 100 dollar program to study and review.
First, I try to do the problem on my own. If I have nothing by the end of the hour, I will look at the solution. When doing Leetcode, drop your ego and keep it moving if you don’t understand the problem. You will learn
nothing starting at a blank IDE for hours on end.
Secondly, I work through the solution on paper. It is important to write through every single iteration within the algorithm to ensure a complete and deep understanding of edge cases and idiosyncrasies between problems.
I keep a sketch journal to draw my way through problems. No need for organization, no need for labels. Just draw damn it, DRAW.
Thirdly, I will code the problem. If I need to use GeeksForGeeks or Neetcode as a crutch, I will. I am an advocate for prioritizing the understanding of the problem rather than syntax.
Finally, If time allows it I will create content over the problem. I love this part, because I get to prove my understanding of the problem and its very rewarding to create something and post it online on my little
corner of the internet. I use this time to analyze time and space complexities, as well as discuss fun things like issues that the problem gave me.
Pacing
I try to Leetcode everyday. I try to do one problem a day. I try to do one video a week. Blogs over problems are sparse because I don’t want Leetcode oversaturating my blog feed. Taking a break is insanely frustrating
for me because it makes me feel like I am regressing in progress. It is something I am going through right now, and I am skimming through Neetcodes’ pathway and everything feels so fresh, but you gotta do what you gotta
do I guess. It'll all be worth it in the end. WAGMI.
- Troy