Free to get started

Coding interviewsbroken down

Stop memorizing solutions. Learn the patterns behind every question, so a problem you've never seen still looks familiar.

We're two engineers who've been on both sides of the interview table, and we built this to get you through yours.

Python data structures

Adding to a list

nums.append(x)O(1)
nums.pop()O(1)
nums.insert(i, x)O(n)

insert() shifts every element after i one slot over, so we suggest append() when the order allows it.

Visual slides

Two Pointers slide 1Two Pointers slide 2Two Pointers slide 3Two Pointers slide 4

The slides show each pattern's algorithm moving one step at a time.

Valid Palindrome

Easy
1
2
3
4
5
6
7
8
9
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
main.pyRun
All tests passed. 3 of 3.

Pattern quiz

Reverse a list of characters in place, without a second list.

Which pattern fits? Go ahead and pick one.

It's Two Pointers. A pointer at each end swaps inward until they meet, and the list reverses in place.

Two Pointers cheat sheet

Cheat sheet earned 🎉

Two Pointers. Ready to download.

Every pattern has a one-page sheet. You earn each one by solving.

“Interviewing is so important for your career growth, yet so easy to mess up.”

The two engineers who created InterviewCrunch (we've been on both sides as interviewees and interviewers)

Plan

How long do you have?

Tell us how much time you have and we'll show you what your plan covers, whether that's one week or three months.

All ten patterns fit at roughly 8 hours a week, covering the core problems for each. The extra practice problems get cut so it all fits.

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 list
  • insert() 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, so use insert() sparingly. If you need to only add to the front, consider using a queue.

main.py
Fundamentals

Get solid on the structures first

Almost every interview problem is built on a list, a dictionary, or a set. Our lessons start there, with plain explanations and runnable examples like this one.

  • Short free lessons cover every structure and what its operations cost.
  • The advanced lessons add heaps, deques, trees, and graphs.
  • Two free cheat sheets sum it all up for later.
Step 1 of 11
Two Pointers slide, step 1 of 11
Two Pointers slide, step 2 of 11
Two Pointers slide, step 3 of 11
Two Pointers slide, step 4 of 11
Two Pointers slide, step 5 of 11
Two Pointers slide, step 6 of 11
Two Pointers slide, step 7 of 11
Two Pointers slide, step 8 of 11
Two Pointers slide, step 9 of 11
Two Pointers slide, step 10 of 11
Two Pointers slide, step 11 of 11

Use ← → arrow keys

Patterns

Learn the pattern behind every interview question

We teach ten patterns, and each one gets visual slides that explain the algorithm step by step. Every solution starts from the same template, so what you learn on one problem carries straight into the next.

Valid Palindrome

Easy

A 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.

"Han ah!" → True"Hugo" → False
main.py
Practice

Practice questions that feel like the real interview

Every pattern comes with practice problems like the ones interviewers actually ask. You write and run your code right in the browser, and each problem checks your solution against real tests.

Recognize

Half the interview is knowing which pattern it is

Most people don't get stuck writing code. They get stuck picking the pattern. This quiz trains that choice: read a problem, pick the pattern, see why it fits. The Daily 8 adds eight fresh questions every day.

Try one right now

Reverse String

Easy

You need to reverse a list of characters in place, without building a second list. Which pattern fits?

Review

Cheat sheets you can earn

Every pattern has a one-page cheat sheet you can keep for review the night before your interview.

  • You earn each sheet by solving half of that pattern's problems.
  • Collect all ten patterns and the complete booklet unlocks.
  • The fundamentals sheets are free, and you don't need an account.

Got an interview coming up?

Hundreds of engineers have prepped with InterviewCrunch. It's free to get started.