- Knowledge is Key
- DS&A Resources
- Problem Solving Methodology
- Questions to Solve
- Making a Plan
- 3 Month Plan
- 1 Month Plan
- Leverage the Internet
- Calming the Nerves
This is a part of a series of guides called Zero to Offer aimed to help you navigate the internship process. We recommend you start here!
Coding Interviews are tough, but with practice you'll be able to pass them with ease. Before continuing, it is required to read the following Tech Interview Handbook pages:
- Coding Round Overview (1 minute read)
- Picking a Language (5 minute read)
- Study and Practice (5 minute read)
Reading the Yangshun guides should take no more than 20 minutes!
Additionally, it might be worth it to watch a real interview. Here is an example video.
Note on Prep: These plans are for prepping before you begin applying to places. You should continue to practice while you apply to and interview with companies. Doing real interviews is the best way to improve! Also: *APPLY AS EARLY AS POSSIBLE.
Everyone will be different, but you should aim to solve somewhere between 50-150 problems depending on your current skill level. However, it's more important to be comprehensively understanding the problems and their solutions. If you haven't taken Algorithms or Data Structures you will first have to obtain a working understanding of them.
Before starting the Leetcode grind, gain a strong understanding of Data Structures and Algorithms (DS&A). This is accomplished by taking the DS&A courses at your university, taking online DS&A courses, or reading textbooks.
Here are a few online courses you could consider:
If you prefer textbooks we recommend
These books are extremely heavy (figuratively and literally) and go into way more detail than necessary for solving coding problems. You should aim to understand:
- Big-O runtime and notation
- The runtime of every data structure
- Why each data structure has its runtimes
Textbooks go into a lot of detail. If you are rusty, or have already taken or are planning on taking a data structures class, it's recommended to look on Youtube or Cracking the Coding Interview for more relevant information.
Note: If you choose to study Cracking the Coding Interview (CTCI), you can substitute Leetcode problems for CTCI's problems.
Also note that some companies will intentionally ask freshmen and sophomore candidates easier questions. For example, Google’s STEP program will ask easier questions.
Some companies might ask questions that are less “Leetcode”-y and more practical. For example, they might ask you about REST APIs or to debug a program. Generally, it is harder to prepare for these types of questions. Your knowledge in these areas will grow as you gain more experience and take more courses.
Our goal is for you to solve a lot of questions, while also not burning out. The 3 month grind is arduous, but it pays off (literally). To prevent burn-out limit yourself to 3 questions a day with a goal of 1 everyday.
When doing these problems, spend 20 - 40 minutes trying to solve it by yourself. If you can't solve it within that time frame, look at the solution and convince yourself you truly understand the solution. While understanding the solution, make sure to also figure out the solution's time and space complexity. You will be expected to know these complexities in an interview so it's best you start ASAP. Don't worry if solutions don't make sense instantly - it's all part of the process!
Also try not to become over-reliant on clicking the “Run code” button in Leetcode. You should be able to walk through the code in your head.
Your ultimate goal is to recognize the patterns of coding problems and the typical runtime of those patterns. We talk about the patterns in a later section.
For more beginner friendly problems, check out the LeetCode Explore Problem Sets. We recommend the following:
After you can comfortably solve problems, definitely reach out to others to start interviewing. Reach out to your school's CS club, or use a website like https://pramp.com. Doing mock interviews is the second best way to get better at interviewing. (The best way is to do actual interviews).
It is important is developing a fundamental understanding of the problems. Here are a few great resources for recognizing patterns of LeetCode problems:
If you are able to recognize and solve these patterns, then interviews will become much less difficult.
We recommend developing a study plan and sticking with it. This will be a lot easier if you do it with others. How much you need to study will be very dependent on your current skill level. It is important that you be consistent in practicing!
We previously recommended the Tech Interview Handbook's Best Practice Questions page. This page has weekly breakdowns on problems to do. However, it is extremely unlikely that you will be able to solve all the problems every week. Instead, for each week do as many problems as you need to do. If the week ends and you haven't done all of that week's problems, just skip to the next week. Don't stress too much about following the Tech Handbook's guide so closely. You're practicing to develop your own fundamentals, so work at your own pace!
Three months is the standard prep time people take for coding interviews. By the end of your three months you should have a general framework on how to approach interview problems and deriving a Big-O runtime for your solutions.
You should follow the Tech Interview Handbook linked above. In the last month, focus on doing more mock interviews.
With one month (30 days) you'll have to work pretty diligently, but there is still a great chance that you will be prepared for coding interviews!
Be comfortable with all of the types of questions listed on the Tech Interview Handbook. Make sure you do 2 or 3 mock interviews.
If you are cramming for an interview, be strategic with your time. This is a great guide listing interview questions by cram score.
We recommend only picking one of these courses.
Before an interview go on Glassdoor, Reddit, and LeetCode Premium and see which questions those websites claim have been asked before. If your friends have interviewed at the same company, reach out to them as well.
Solve as many of the company specific problems as you can. If there are a lot of questions, try and answer a question for each data structure and concept (Arrays, Strings, Dynamic Programming, Trees, etc.).
When doing these problems try to take no more than 10 minutes thinking of a solution on your own. You don't have time to spare so you need to study up on as many problems as necessary. You don't want to worry too much about figuring out run-time for each of these problems. Focus on the solutions!
People tend to do better on interviews that they are not stressed about. This is easier said than done but, don't overly stress about your interviews! If you stress too much you'll end up just psyching yourself out.
Next: Post Interview