Coding interviewsbroken down
We'll walk you through the patterns behind interview questions one step at a time. That way a problem you've never seen still looks familiar.
Use ← → arrow keys
How long do you have?
We make you a study plan that fits the time you have before your interview.
What you'll learn each week
You can learn all 10 patterns.
That's 25 problems.
We give you fewer problems per pattern so you can learn more patterns.
You can also read our one-week, one-month and three-month study plans.
Fundamentals
Short lessons show you each data structure and how fast its operations are.
Patterns
We teach ten patterns with step-by-step slides. All the solutions for a pattern start from the same template.
Practice
You solve real interview problems and run your code right in the browser without installing anything.
Recognize
Daily quizzes test how fast you can tell which pattern solves a problem.
Review
Solve problems to earn a one-page cheat sheet for every pattern.
We've both been the interviewer and the candidate more times than we can count. We kept seeing people who could code well but didn't know how to start on a new problem. We built InterviewCrunch to teach that first step.
Adding to a list
O(n) or O(1)Here are two common methods to add elements to a list:
append()adds the element to the end of the listinsert()takes in a second argument that specifies what position to add the element at
Note
insert() is an O(n) complexity operation whereas append() is an O(1) operation. Use insert() sparingly. Use a queue if you only need to add to the front.
secret = ["I", "love", "lists"]
secret.append("!!")
secret.insert(1, "really")
print(secret)Learn the data structures first
Almost every interview problem is built on a list, a dictionary, or a set. Our lessons start there. They explain each one in plain words and give you examples you can run, like the one on this page.
- The free lessons explain every structure and how fast each of its operations runs.
- The advanced lessons add heaps, deques, trees, and graphs.
- You also get two free cheat sheets to review it all later.
Use ← → arrow keys
Watch each algorithm run one step at a time
Each of the ten patterns we teach comes with visual slides that walk through the algorithm step by step. All the solutions for a pattern start from the same template. That means you can use what you learn on one problem on the next one.
Valid Palindrome
EasyA phrase is a palindrome if it reads the same forward and backward after ignoring punctuation, capitalization, and spaces. Write a function that returns true if the given string is one.
def is_palindrome(s):
left = 0
right = len(s) - 1
while left < right:
if s[left] != s[right]:
return False
left += 1
right -= 1
return True
print(is_palindrome("step on no pets"))Practice questions that feel like the real interview
Every pattern comes with practice problems like the ones interviewers actually ask. You write your code right in the browser and run it against test cases to see if it works.
First you need to know which pattern to use
Lots of people get stuck on a problem they could have solved because they don't know where to start. You can practice that first step with this quiz. You read a problem and pick which pattern you'd use. We explain why the right pattern fits after you answer. The Daily 8 gives you eight new questions every day.
Reverse String
EasyYou need to reverse a list of characters in place, without building a second list. Which pattern fits?
Cheat sheets you can earn
Every pattern has a one-page cheat sheet you can keep for review.
- You earn each sheet by solving half of that pattern's problems.
- You get the complete PDF booklet when you finish all ten patterns.
- You can download the fundamentals sheets for free without an account.

It's free for everyone.
Got an interview coming up?
Hundreds of engineers have prepped with InterviewCrunch. It's free to get started.