Coding Interview Prep

This review sheet is an outline of the core concepts common to most software engineering interviews. It specifically does not cover some concepts which are not commonly asked about (eg. bitwise operators). This is designed to help you spend your preparation time most effectively. For more topics, explanations, and questions see more resources below.

Click on questions to see brief answers. Click here to toggle all the answers.

  1. How To Prepare
  2. Algorithms You Gotta Know
  3. Personal & Project Questions
  4. Hardware Basics
  5. Unix Basics
  6. Intermediate Algorithms
  7. How to Solve a Problem
  8. Practice Problems
  9. More Resources

How to Prepare

Algorithms You Gotta Know

The questions here are not questions you should expect to get an interview. They are designed to check that you understand the algorithms needed to answer most interview questions. You should feel very comfortable answering all these questions before interviewing.

Binary Search


Merge Sort

Your Favorite Sorting Algorithm - Literally choose a favorite sorting algorithm before your interview


Graphs & Search

Data Structures

Personal/Project Questions

You should prepare an answer to each of these questions. Even if you don't get the exact question, you can use the same answer/story/problem.

Hardware Basics



Unix Basics



Intermediate Algorithms to Know

How to Solve a Problem

  1. Make sure you clearly understand the question and clarify edge cases with your interviewer (eg. duplicates, bad input, wrong datatype input)
  2. Start by giving a naive solution and then improving it. Do not start thinking of the optimal solution. Start by telling you interviewer a naive solution, eg. "We could check every combination which would take O(n2). We could do it quicker by hashing each element ... which will be O(n) time."
  3. Explain your algorithm/solution to your interviewer before writing any code
  4. Once you and the interviewer have agreed on the algorithm, then you can start coding
  5. Most interviewers don't care what language you work in. Use what you're most comfortable with. (But if it's on your resume, it's fair game.)
  6. Feel free to separate your solution into multiple functions to avoid repetition or make the code more legible, eg. cartesianToPolar(x,y) and give your functions and variables meaningful names
  7. For a phone interview, practice writing coding solutions on a google doc
  8. For an in-person interview, practice writing coding solutions on a whiteboard or a piece of paper
  9. After you've written your code, choose a sample input and walk through the code, making sure it runs as expected

Practice Problems

Find other sources of more problems below

Basic problems

You should be able to come up with a solution to these problems within 5 minutes and write a working solution in another 10 minutes.

More Resources

If you want a lot of practice problems and more in-depth preparation, the best book is Cracking the Coding Interview. It covers everything including resumes, what to wear, etc.

More Problems

Learning Algorithms

Questions, comments, feedback -