Courses

Google Coding Interview

Google's angle: arrays and strings done exactly right, one careful step at a time.

Islands
8
Lessons
72
Exercises
250
Complete codeDebugCode orderMultiple choiceTapTrace
  1. Island 1

    Merge Strings Alternately

    Weave two strings together one letter at a time, appending whatever remains of the longer one.

    1. Decode the Problem3 exercises, 4 min
    2. Approach Check4 exercises, 4 min
    3. Build the Brute Force3 exercises, 5 min
    4. Find the Bottleneck2 exercises, 4 min
    5. Discover the Optimal Approach3 exercises, 4 min
    6. Assemble the Algorithm2 exercises, 5 min
    7. Read the Implementation3 exercises, 5 min
    8. Test and Analyze3 exercises, 4 min
    9. Boss BattleBoss8 exercises, 8 min
  2. Island 2

    Palindrome Number

    Decide whether an integer reads the same forwards and backwards — without turning it into a string.

    1. Decode the Problem3 exercises, 4 min
    2. Approach Check4 exercises, 4 min
    3. Build the Brute Force3 exercises, 5 min
    4. Find the Bottleneck2 exercises, 4 min
    5. Discover the Optimal Approach3 exercises, 4 min
    6. Assemble the Algorithm2 exercises, 5 min
    7. Read the Implementation3 exercises, 5 min
    8. Test and Analyze3 exercises, 4 min
    9. Boss BattleBoss8 exercises, 8 min
  3. Island 3

    Roman to Integer

    Convert a Roman numeral to its value, honoring the six subtractive pairs like IV and CM.

    1. Decode the Problem3 exercises, 4 min
    2. Approach Check4 exercises, 4 min
    3. Build the Brute Force3 exercises, 5 min
    4. Find the Bottleneck2 exercises, 4 min
    5. Discover the Optimal Approach3 exercises, 4 min
    6. Assemble the Algorithm2 exercises, 5 min
    7. Read the Implementation3 exercises, 5 min
    8. Test and Analyze4 exercises, 4 min
    9. Boss BattleBoss8 exercises, 8 min
  4. Island 4

    Merge Sorted Array

    Merge a second sorted array into the spare tail of the first — in place, without losing elements.

    1. Decode the Problem3 exercises, 4 min
    2. Approach Check4 exercises, 4 min
    3. Build the Brute Force3 exercises, 5 min
    4. Find the Bottleneck2 exercises, 4 min
    5. Discover the Optimal Approach3 exercises, 4 min
    6. Assemble the Algorithm2 exercises, 5 min
    7. Read the Implementation3 exercises, 5 min
    8. Test and Analyze3 exercises, 4 min
    9. Boss BattleBoss8 exercises, 8 min
  5. Island 5

    Longest Consecutive Sequence

    Find the length of the longest run of consecutive integers hiding unordered in an array.

    1. Decode the Problem3 exercises, 4 min
    2. Approach Check4 exercises, 4 min
    3. Build the Brute Force3 exercises, 5 min
    4. Find the Bottleneck2 exercises, 4 min
    5. Discover the Optimal Approach3 exercises, 4 min
    6. Assemble the Algorithm2 exercises, 5 min
    7. Read the Implementation3 exercises, 5 min
    8. Test and Analyze3 exercises, 4 min
    9. Boss BattleBoss8 exercises, 8 min
  6. Island 6

    Spiral Matrix

    Read a matrix in spiral order — around the outside and inward ring by ring.

    1. Decode the Problem3 exercises, 4 min
    2. Approach Check4 exercises, 4 min
    3. Build the Brute Force3 exercises, 5 min
    4. Find the Bottleneck2 exercises, 4 min
    5. Discover the Optimal Approach3 exercises, 4 min
    6. Assemble the Algorithm2 exercises, 5 min
    7. Read the Implementation3 exercises, 5 min
    8. Test and Analyze3 exercises, 4 min
    9. Boss BattleBoss8 exercises, 8 min
  7. Island 7

    Container With Most Water

    Pick the two walls that hold the most water — area is width times the shorter wall.

    1. Decode the Problem3 exercises, 4 min
    2. Approach Check4 exercises, 4 min
    3. Build the Brute Force3 exercises, 5 min
    4. Find the Bottleneck2 exercises, 4 min
    5. Discover the Optimal Approach3 exercises, 4 min
    6. Assemble the Algorithm2 exercises, 5 min
    7. Read the Implementation3 exercises, 5 min
    8. Test and Analyze4 exercises, 5 min
    9. Boss BattleBoss8 exercises, 8 min
  8. Island 8

    Next Permutation

    Rearrange numbers into the very next arrangement in dictionary order — in place, wrapping to smallest from the last.

    1. Decode the Problem3 exercises, 4 min
    2. Approach Check4 exercises, 4 min
    3. Build the Brute Force3 exercises, 5 min
    4. Find the Bottleneck2 exercises, 4 min
    5. Discover the Optimal Approach3 exercises, 4 min
    6. Assemble the Algorithm2 exercises, 5 min
    7. Read the Implementation3 exercises, 5 min
    8. Test and Analyze3 exercises, 4 min
    9. Boss BattleBoss8 exercises, 8 min
AlgoFox Pro

Google Coding Interview is part of AlgoFox Pro

You can read the whole course outline here. The exercises are in the app, along with your streak, your mistake review, and the progress that carries across your devices.

Pro starts with a 3 day free trial. The app store decides who is eligible for an introductory offer, and a lapsed subscription does not get another one.

Download AlgoFox on the App StoreGet AlgoFox on Google Play

Already subscribed in the app? Sign in with the same account and Pro works here too. Quick Play and Battle are free on the web, and so is the first course in every subject.