Hey fellow coder! Two main reasons for you to use this guide:

  1. If you’re learning Leetcode for the first time, to land your first internship or full time SWE offer
  2. If you’re getting back to Leetcode after getting back into the job market

The structure, patterns, and questions in this guide are intended to give you the highest ROI, so you can focus on the best, most common & relevant, questions that you will be asked in technical interviews.

So far I’ve had 3 different time periods when I was interviewing a lot (1st time when I was looking for an internship; 2nd time when I was looking for additional opportunities for a new grad position; 3rd time when I was interviewing for mid-level roles), and during each period going through tens of interviews, the patterns & questions only repeated themselves. I’ve always heard that was the case, but seeing this for myself after 40+ technical interviews for 15+ companies convinced me that’s how things are.

Once you get good in these topics, you will be able to pass interviews for most companies most of the time (the exceptions will be touched on later). This guide builds on other great resources that I’ve used before like the Blind 75 questions list and expands on the questions and patterns, and shows you how to approach the practice in general, with becoming good at Leetcode for passing interviews in mind. So, let’s gets started!

How to use this guide

The 12 weeks are divided into 3 different sections based on the high level data structures: Arrays, Trees, and Graphs. Each week will cover a pattern for the data structure with 2 lists of questions:

  1. Study solution list - first you study the solutions of the questions in this list
  2. Practice & apply list - second you try to solve questions in this list

First, you want to dedicate time to deeply understand the new pattern you’re learning and not just understand the canonic example but grasp how solutions are implemented. During this phase, you take time to learn all the nuts and bolts of the question & the solution. The goal is not to memorize but to develop an intuition so that by the time you start practicing you can more easily identify how to solve a new question and what specific changes are necessary to address its constraints and requirements.

Don’t rush during this phase, if you leave gaps in your understanding now, it’ll force you to get back to those gaps at some point later on until you dedicate the time to clearly understand it. Below you will see there is a column dedicated for notes, when you’re done with the 12 weeks you will be looking at that column to identify your next steps—you’re not going to be perfect after 12 weeks, so you should write down questions, patterns, and general observations so you know what you should revise and reinforce (click on the duplicate button in the top right corner of this page so you could make edits). This should be your #1 priority before moving on to any other less common topic assuming that you’re not preparing for a specific company but to be able to land multiple competitive offers.

To study a solution of some question, choose the most common or straightforward solution that was accepted. It will usually have the highest amount of upvotes. Exotic or unique solutions are cool, but the goal here is to become good at Leetcode to the end of landing SWE offers, and doing so as efficiently as possible. As you study the solution, make sure to use a pen and paper. Writing is a tool for thinking and it’s like an IQ boost for our brain, so don’t merely read the solution but write down what you think it does, make a dry run, try to sketch a flowchart or a visual representation of what it does.

You’re done studying the solution once you can clearly explain how the solution works and addresses any edge cases. Make sure to:

  1. Read the code and gain a high level understanding
  2. Make a dry run with some values
  3. Look for how it addresses edge cases
  4. Don’t try to memorize lines of code, make sure you understand what the overall algorithm does and how it’s implemented—if you focus on lines of code rather than a holistic understanding then you won’t be building intuition

When you go to the 2nd list and start practicing, if you see that you’re stuck on a question for more than 15 minutes, meaning that you no longer have any ideas for how to solve the question for 15 minutes or more, study the solution and notice what’s the gap between your current thinking and what was required to solve the question. Hint: you should make a note of this in the Retrospection notes column.

When you can, dedicate the mornings for doing this, right after you wake up—don’t touch the phone or let your mind scatter anywhere else. Take a break every 30 minutes or so but without scrolling social media or jumping on the phone, get off the screen and walk around or just breath before you get back—you will notice a meaningful difference of how well you can focus and soak in the most from your session. If mornings are not an option, do it whenever you can, but consistently on a daily basis*.*