Meta interview prep

Practice 30 problems from community-reported Meta interviews.

Ranked problems

30 problems
Meta 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
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
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
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
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
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
Arrays

Rearrange the numbers in place into the next lexicographic order. If already last, wrap to the first ordering.

On the Microsoft, Meta lists.

Medium
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
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
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
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
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

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
Bit manipulation

Every value in an array occurs twice except one. Find the unpaired value in linear time using constant extra space.

On the Meta list.

Easy
Heaps

Find the value in position k when the array is ordered from largest to smallest, counting duplicates.

On the Meta, Morgan Stanley lists.

Medium
Two pointers

Move every zero to the end of an array in place while keeping the other values in their original order.

On the Microsoft, Meta 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

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
Two pointers

Ignore punctuation, spaces, and letter case. Decide whether the remaining letters and digits form a palindrome.

On the Meta list.

Easy
Hash tables

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

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

Easy
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
Hash tables

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

On the Google, Meta lists.

Easy
Strings

Locate the first occurrence of a pattern inside a string and return its starting index, or −1 if it never appears.

On the Meta list.

Easy
Backtracking

Generate every subset of a list of distinct numbers, including the empty set.

On the Microsoft, Meta lists.

Medium
Prefix sums

For each index, compute the product of every other array entry in linear time without division.

On the Meta list.

Medium
Sliding window

Find the longest stretch of ones you can obtain in a binary array by flipping at most k zeros.

On the Meta, Tekion lists.

Medium
Stacks

Find the length of the longest contiguous stretch of correctly matched parentheses.

On the Meta list.

Hard
Sliding window

Find the shortest contiguous segment of positive integers whose sum reaches a target. Return zero if the entire array falls short.

On the Meta list.

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

  • Meta · Six months · 21 October 2026