Cluster Defective Dies on a Circular Wafer Map
Last updated: November 29, 2026
Quick Overview
A wafer map is a grid where 'X' is a failing die, '.' a passing die and '-' a position outside the round wafer. Return the sizes of all 8-connected failing clusters with at least k dies, largest first.
Samsung
November 29, 20260
0
0 solved
A wafer map is a grid where 'X' is a failing die, '.' a passing die and '-' a position outside the round wafer. Return the sizes of all 8-connected failing clusters with at least k dies, largest first.
Yield engineering teams in Samsung's memory and foundry businesses look for spatial defect clusters because they point to a process or tool problem, while scattered fails are random. The screen checks a clean flood fill, correct neighborhood choice and treatment of off-wafer cells.
What the Interviewer Expects
- Uses 8-connectivity because diagonal neighbors on a wafer are physically adjacent
- Marks cells visited when pushed, not when popped
- Uses an iterative stack to avoid recursion depth issues on 300 mm maps
- Ignores off-wafer '-' cells
- Filters by size and sorts output
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you classify a cluster as an edge ring, a scratch or a center blob?
- Maps for 25 wafers in a lot are stacked. How do you find die positions that fail repeatedly?
- How would you do this with union-find on a stream of failing coordinates?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Input: list of equal-length strings and integer k. Output: list of cluster sizes >= k sorted descending. 'X' cells are the only nodes; edges join any of the 8 surrounding cells....
High-Level Design
Scan every cell. On an unvisited 'X', run DFS with an explicit stack, counting cells. Mark visited when a cell is pushed so it is never pushed twice. Keep the size if it reaches k....