Google interview prep

Practice 30 problems from community-reported Google interviews.

Ranked problems

30 problems
Google interview prep, ordered by rank
ProblemDifficultyCompany lists
Hash tables

Find the indices of two different elements in an array whose values add up to a given target.

On the Amazon, Google, Microsoft, Meta, Samsung, Tekion, IBM, Oracle, J.P. Morgan, Morgan Stanley lists.

Try [2, 7, 11, 15] with a target of 9.

Reveal the indices

[0, 1] points to 2 and 7.

Easy
Linked lists

Two linked lists hold the digits of two numbers in reverse order. Return their sum in the same format.

On the Amazon, Google, Microsoft, Meta lists.

Medium
Math

Decide whether the decimal digits of an integer read the same from either end.

On the Amazon, Google, Microsoft, Meta, Morgan Stanley lists.

Easy
Binary search

Find the median of two sorted arrays in logarithmic time relative to their combined length.

On the Amazon, Google, Microsoft, Meta lists.

Hard
Two pointers

Find every distinct triple of values that adds up to zero, using three different positions in the array.

On the Amazon, Google, Microsoft, Meta, Samsung, Oracle, Morgan Stanley lists.

Medium
Arrays

Given daily prices, find the best profit from buying once and selling on a later day. Return zero if no trade makes money.

On the Amazon, Google, Microsoft, Meta, IBM, J.P. Morgan, Morgan Stanley lists.

Easy
Sliding window

Find the length of the longest contiguous stretch of a string in which no character appears twice.

On the Amazon, Google, Microsoft, Meta, Tekion, IBM, Oracle, J.P. Morgan, Morgan Stanley lists.

Medium
Two pointers

Given a row of unit-width bars of different heights, calculate how much rainwater settles between them.

On the Amazon, Google, Microsoft, Meta, Samsung, Tekion lists.

Hard
Arrays

Build a new array by placing two copies of the input end to end.

On the Google list.

Easy
Hash tables

Find how many values form the longest run of consecutive integers in an unsorted array, in linear time.

On the Amazon, Google, Microsoft lists.

Medium
Math

Reverse the decimal digits of a signed 32-bit integer. Return zero if the result would overflow that range.

On the Google, Meta lists.

Medium
Strings

Find the longest starting sequence of characters shared by every string in a list.

On the Amazon, Google, Microsoft, Meta, IBM lists.

Easy
Two pointers

Choose two vertical lines that, together with the x-axis, can hold the greatest area of water.

On the Amazon, Google, Microsoft, Meta, IBM, Oracle lists.

Medium
Stacks

Check whether a string of round, square, and curly brackets closes every opening bracket in the correct order.

On the Amazon, Google, Microsoft, Meta, IBM, Oracle lists.

Easy
Strings

Return the longest contiguous part of a string that reads the same forward and backward.

On the Amazon, Google, Microsoft, Meta, Tekion, IBM, Oracle, J.P. Morgan lists.

Medium
Two pointers

Compact a sorted array in place so each distinct value appears once at the front, then return the number of distinct values.

On the Google, Microsoft, Meta, Morgan Stanley lists.

Easy
Hash tables

Group words that contain exactly the same letters with the same counts, regardless of order.

On the Amazon, Google, Meta, Oracle, J.P. Morgan, Morgan Stanley lists.

Medium
Two pointers

Merge two sorted integer arrays into the spare space at the end of the first array, keeping the result sorted.

On the Google list.

Easy
Counting

An array contains a value that appears more than half the time. Identify it.

On the Amazon, Google lists.

Easy
Dynamic programming

Find the largest sum you can make by taking a nonempty, contiguous part of an array.

On the Amazon, Google, Microsoft, Meta, Tekion, Oracle lists.

Medium
Hash tables

Decide whether two strings contain exactly the same characters with the same multiplicities.

On the Google, Microsoft, Meta, IBM, Oracle lists.

Easy
Prefix sums

Count how many nonempty contiguous parts of an integer array have a sum of exactly k.

On the Amazon, Google, Microsoft, Meta, IBM, J.P. Morgan lists.

Medium
Hash tables

Determine whether any value occurs at least twice in the input array.

On the Google, Meta lists.

Easy
Dynamic programming

Count the different ways to reach the top of a staircase if each move climbs one or two steps.

On the Google, Microsoft lists.

Easy
Binary search

Find the slowest whole-number eating speed that finishes all the piles on time. Each hour can be spent on only one pile.

On the Amazon, Google, Oracle lists.

Medium
Linked lists

Splice the nodes of two sorted linked lists together and return the head of the merged list.

On the Google list.

Easy
Strings

Read a Roman numeral and compute its integer value, accounting for smaller symbols that precede larger ones.

On the Google, Microsoft, IBM lists.

Easy
Binary search

Find the integer part of the square root of a nonnegative number without using a power or exponent function.

On the Google list.

Easy
Binary search

Divide an array of nonnegative numbers into exactly k nonempty contiguous parts. Minimize the largest part sum.

On the Google, Tekion lists.

Hard
Arrays

Scan a binary array for the longest uninterrupted run of ones.

On the Google list.

Easy
How are questions ranked?

Company lists follow community-reported interview frequency. Ties keep the source order. Where a list uses two sources, we keep the first list’s ranks and fill the remaining places with the highest-ranked distinct problems from the second.

Across companies, first place earns 30 points and each subsequent rank earns one fewer. We add each problem’s points and break ties alphabetically.

  • Google · Six months · 21 October 2026