Samsung interview prep

Practice 30 problems from community-reported Samsung interviews.

Start practicing Longest Increasing Subsequence

Ranked problems

30 problems
Samsung interview prep, ordered by rank
ProblemDifficultyCompany lists
Dynamic programming

Find the length of the longest strictly increasing sequence you can keep when deleting elements without reordering the rest.

On the Samsung list.

Medium
Dynamic programming

Choose an order to pop balloons that maximizes your coins. Each pop earns the product of that balloon and its two current neighbors.

On the Samsung list.

Hard
Sliding window

Find every starting index where the next characters form all the supplied equal-length words, in any order and with their given multiplicities.

On the Samsung list.

Hard
Binary search

Identify a hidden number from 1 to n using feedback that tells you whether each guess was too high, too low, or correct.

On the Samsung list.

Easy
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
Trees

Group tree values by column from left to right. Within a column, order by depth and break position ties by value.

On the Samsung list.

Hard
Data structure design

Design a fixed-capacity cache with constant-time reads and writes. When it fills up, evict the least recently used key.

On the Amazon, Microsoft, Samsung, Oracle, J.P. Morgan, Morgan Stanley lists.

Medium
Dynamic programming

Travel from the bottom-right corner to the top-left, stepping up, left, or diagonally past obstacles. Find the highest score and count the paths that earn it.

On the Samsung list.

Hard
Graphs

Find the cheapest journey between two points when you can walk at Manhattan-distance cost or take one-way roads at their listed prices.

On the Samsung list.

Medium
Heaps

Make the gap between the largest and smallest numbers as small as possible. You may double an odd number or halve an even one.

On the Samsung list.

Hard
Counting

Count how many moves to the previous distinct lexicographic permutation it takes to sort a string. Return the count modulo 1,000,000,007.

On the Samsung list.

Hard
Greedy

Build a nonnegative sequence starting at zero. Find its highest possible peak given caps at specific positions and limits on changes between neighbors.

On the Samsung list.

Medium
Game theory

Two players take turns removing stones. Determine whether Alice can force a win when a removal loses if the running sum is divisible by three and Bob wins if the stones run out.

On the Samsung list.

Medium
Binary search

Divide an even-length array into two equal-sized groups and minimize the absolute difference between their sums.

On the Samsung list.

Hard
Dynamic programming

Find the area of the largest square whose four borders contain only ones in a binary grid. Its interior may contain zeros.

On the Samsung list.

Medium
Dynamic programming

Rotate and stack cuboids to maximize total height while keeping every dimension of an upper cuboid within the corresponding dimension below it.

On the Samsung list.

Hard
Arrays

Pick two different positions, subtract one from each selected value, and maximize the product of the results.

On the Samsung, J.P. Morgan lists.

Easy
Trees

For each node in a tree rooted at zero, count the nodes in its subtree that share its letter, including the node itself.

On the Samsung list.

Medium
Arrays

For each column of an integer grid, find how many characters are needed to display its widest entry, including any minus sign.

On the Samsung list.

Easy
Graphs

Implement a directed, weighted graph that accepts new edges and answers minimum-cost path queries, returning −1 for an unreachable destination.

On the Samsung list.

Hard
Trees

Determine whether two different nodes in a binary search tree have values that sum to the target.

On the Samsung list.

Easy
Strings

Simulate a keyboard where typing the letter i reverses the text so far and every other letter is appended normally.

On the Samsung list.

Easy
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
Graph traversal

Count the connected patches of land in a grid. Cells connect horizontally or vertically.

On the Amazon, Microsoft, Samsung, Oracle lists.

Medium
Graphs

Assign people to two groups so that each pair who dislike one another ends up in different groups. Decide if this can be done.

On the Samsung list.

Medium
26IPO
Heaps

Choose up to k projects to maximize your final capital. A project becomes available when your capital reaches its required minimum.

On the Samsung list.

Hard
Graphs

Can you split the vertices of an undirected graph into two groups so every edge crosses between them?

On the Samsung list.

Medium
Sliding window

Count the contiguous segments of a positive-integer array whose product is strictly below k.

On the Samsung, Tekion lists.

Medium
Binary search

Find an index whose value is greater than its immediate neighbors in logarithmic time, treating the positions beyond the array as negative infinity.

On the Samsung list.

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

  • Samsung · All time · 21 October 2026