Flag Clustered Wafer Defects and Ink Out Neighboring Dies
Last updated: November 29, 2026
Quick Overview
Given a wafer map grid where X is a failing die, . is a passing die and blank is off-wafer, find 8-connected clusters of failing dies of size at least k and return how many such clusters exist and which passing dies touch them and should be inked out as reliability risks.
Intel
November 29, 20260
0
0 solved
Given a wafer map grid where X is a failing die, . is a passing die and blank is off-wafer, find 8-connected clusters of failing dies of size at least k and return how many such clusters exist and which passing dies touch them and should be inked out as reliability risks.
Intel's fabs run wafer sort on every wafer, and yield and test software teams post-process wafer maps so that good dies next to a defect cluster are scrapped before packaging. The interviewer looks for a clean flood fill, correct neighbor handling and a sensible way to avoid double counting.
What the Interviewer Expects
- Uses BFS or DFS with a visited grid to find each cluster once
- Uses 8-connectivity for both clustering and the ink-out ring
- Only inks passing dies, never off-wafer cells
- Collects ink candidates in a set to avoid duplicates
- States O(rows * cols) complexity
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 ink two rings of dies instead of one?
- Wafer maps arrive at thousands per hour. How would you parallelize?
- How would you detect spatial signatures such as edge rings or scratches rather than blobs?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Grid of X, ., and space. Clusters are 8-connected groups of X. A cluster counts as significant when its size is at least k. Every passing die in the 8-neighborhood of a significant cluster is ...
High-Level Design
Scan every cell. When an unvisited X is found, BFS to collect the full cluster, marking cells as seen when enqueued. If the cluster is big enough, walk its cells again and add each passing neighbor ...