Medium Samsung Interview Questions: Strategy Guide
How to tackle 37 medium difficulty questions from Samsung — patterns, time targets, and practice tips.
Medium questions at Samsung typically involve multi-step logic, moderate data structure manipulation, and careful edge case handling. They sit between straightforward array problems and complex graph/DP challenges, often testing your ability to translate a practical scenario into clean, efficient code. Expect to see problems involving matrices, strings with constraints, and common structures like trees or linked lists with a twist.
Common Patterns
Samsung’s Medium problems frequently test a few recurring patterns. Matrix traversal and modification is a staple—many problems involve navigating a grid with specific rules, often requiring BFS/DFS for connected components. String processing questions often involve comparison, transformation, or validation with extra conditions, pushing beyond simple iteration. Another common theme is implementing a custom data structure or algorithm that mimics a real-world process, like a scheduler or a parser. Tree and graph problems at this level usually focus on pathfinding, serialization, or property validation without extremely high complexity.
# Example: Matrix BFS (Number of Islands variant)
def count_regions(grid):
if not grid:
return 0
rows, cols = len(grid), len(grid[0])
directions = [(1,0),(-1,0),(0,1),(0,-1)]
def bfs(r, c):
queue = [(r, c)]
grid[r][c] = '0'
while queue:
cr, cc = queue.pop(0)
for dr, dc in directions:
nr, nc = cr + dr, cc + dc
if 0 <= nr < rows and 0 <= nc < cols and grid[nr][nc] == '1':
grid[nr][nc] = '0'
queue.append((nr, nc))
count = 0
for r in range(rows):
for c in range(cols):
if grid[r][c] == '1':
bfs(r, c)
count += 1
return count
Time Targets
You should aim to solve a Medium problem in a Samsung interview within 25-30 minutes. This includes understanding the problem, discussing your approach, writing the code, and walking through test cases. Allocate about 5-7 minutes for clarifying questions and edge cases, 10-12 minutes for designing the solution and explaining it, and 8-10 minutes for implementation and verification. Practice under timed conditions to build speed without sacrificing code quality or correctness.
Practice Strategy
Focus on pattern recognition, not memorization. Group Samsung’s Medium questions by type—matrix, string, tree, etc.—and solve them in batches to internalize the common techniques. For each problem, write the code in one language you’ll use in the interview, but understand the syntax differences for others. Always test with edge cases: empty inputs, single elements, large values. After solving, analyze the time and space complexity aloud as you would in an interview. Revisit problems you struggled with after a few days to reinforce learning.