KEEP LOOKING AHEAD !
This structured coding challenge is designed to test your programming skills through a
series of increasingly complex milestones. Each milestone represents a distinct problem
to solve, with clearly defined input/output test cases to validate your solutions.
HACKATHON FORMAT
• Duration: 6 hours
• Structure: 12 sequential milestones
• Testing: Each milestone contains 5-6 test cases for validation
• Data Formats: Test cases will be provided in JSON, CSV, or TXT formats
• Progression: Participants must successfully complete each milestone before
advancing to the next
WAFER PROCESS OPTIMIZATION: UNIQUE SEQUENCE DETECTION
PROBLEM OVERVIEW:
In semiconductor manufacturing, wafers go through multiple process steps in sequence. To
maintain quality control and efficiency, it's important to identify the longest continuous
sequence where no step repeats.
PROBLEM STATEMENT:
You are given a text file containing a sequence of process steps. Your goal is to:
• Find the length of the longest substring where no step repeats.
• Each character represents a unique process step (e.g., 'a' = annealing, 'b' = bonding,
etc.).
• Your solution should run in O(N) time to efficiently handle large process sequences.
INPUT:
Each test case is provided in a separate .txt file.
Process_sequence.txt:
abcabcbb
The input file contains:
• A single line with a string where each character represents a process step.
OUTPUT:
Max_unique_sequence.txt:
3
This means the longest unique substring in "abcabcbb" is "abc" (length 3).
BLOCK STACK CALIBRATION
PROBLEM OVERVIEW:
In this task, you'll simulate a calibration process used in chip packaging, where special blocks
must be stacked in a stable configuration for testing vertical precision alignment.
BACKGROUND:
During the alignment phase, a robotic system stacks cubes to form a 3D triangular pyramid
structure. Due to size constraints, only complete layers can be formed. Your task is to
determine how high this structure can go using a given number of blocks.
Each layer follows a precise stacking rule, forming a triangular layer on each level, such
that:
● Layer 1 = 1 block
● Layer 2 = 3 blocks
● Layer 3 = 6 blocks
● Layer 4 = 10 blocks
● ...
Each new layer sits perfectly on top of the previous, creating a 3D pyramid shape used in
quality assurance testing.
INPUT FILE:
Supply.csv:
A CSV file with a single value representing the number of available blocks.
Example:
Blocks
35
OUTPUT FILE:
Stack_config.csv
Max Height,Blocks Used,Remaining Blocks
5,35,0
The output file should contain three values for the optimal stacking of blocks into a
tetrahedral structure:
Column Description
The tallest possible complete tetrahedral tower that can be built with the
Max Height
given blocks.
Blocks Used The total number of blocks used in the tower.
Blocks
The number of blocks left unused after building the tower
Remaining
CHIP INSPECTION PATTERN GENERATION
PROBLEM OVERVIEW:
In semiconductor manufacturing, inspection tools follow a precise triangular scan pattern
to detect defects on wafer surfaces. This pattern guides the optical inspection beam to
ensure optimal coverage of potential chip defects.
Your task is to develop an algorithm that generates this inspection pattern in TXT format
based on a given density value.
REQUIREMENTS:
• The algorithm must read an integer n from an input.txt file.
• It must generate a pyramid pattern of n rows using alternating inspection points
(*) and spaces.
• The output must be stored in output.txt.
INPUT:
Input.txt:
5
A single integer n, which represents the pattern density (number of rows in the pyramid).
OUTPUT:
Output.txt:
*
**
***
****
*****
A pyramid pattern with n rows, where:
• Each row is center-aligned.
• Inspection points (*) are separated by spaces to maintain a structured scan pattern.
TARGETED PAIR IDENTIFICATION IN SORTED DATASETS
PROBLEM OVERVIEW:
In this challenge, you need to find a pair of numbers in a sorted dataset that adds up to a
given target.
NOTE: Your solution must run in O(N) time complexity
PROBLEM STATEMENT:
• Given a sorted list of integers, identify two distinct numbers that sum up to a target
value.
• The output should contain the 1-based indices of these two numbers.
• There is exactly one valid pair in each dataset.
INPUT:
Sum_input.json:
{
"size": 4,
"numbers": [2, 7, 11, 15],
"target": 9
}
OUTPUT EXPECTED:
Sum_output.json:
{
"index1": 1,
"index2": 2
}
1. The input list is sorted in ascending order.
2. You must find exactly one pair that sums to the given target.
3. The output should only contain the 1-based indices of the selected numbers.
4. Do not use the same element twice.
WAFER CONTAMINATION PROPAGATION ANALYSIS
PROBLEM STATEMENT:
In semiconductor manufacturing, we need to monitor and predict how contaminants spread
across a wafer during fabrication. Your task is to develop an algorithm that simulates
contamination propagation and determines the minimum time until all susceptible areas are
affected.
• The wafer is represented as an m × n grid where each cell represents a discrete region
• Each region is in one of three states:
• 0: Empty or protected region (no active circuits)
• 1: Uncontaminated region with active circuits
• 2: Contaminated region that will affect adjacent regions
• Contamination spreads from contaminated regions to adjacent uncontaminated regions in
discrete time intervals (one minute per fabrication cycle)
• Contamination can only spread in four directions: up, down, left, and right
• Protected regions (0) cannot be contaminated
TASK:
Your goal is to determine the minimum number of process cycles (minutes) required to
contaminate all active circuits (1).
• If some active circuits remain uncontaminated, return -1 (indicating fabrication
failure requiring intervention).
INPUT:
Wafer_state.txt: A text file containing an m × n grid representing the initial wafer state.
211
110
011
• Rows and columns are space-separated.
• The grid size (m × n) is not fixed and can vary.
OUTPUT:
Contamination_time.txt:
4
A single integer representing:
• The minimum time (in minutes) required for complete contamination.
• -1 if some active circuits (1) remain uncontaminated due to isolation.
WAFER INSPECTION PATH OPTIMIZATION
PROBLEM OVERVIEW:
In this challenge, you need to scan and detect defects on a semiconductor wafer using the
fewest number of vertical inspection beams.
PROBLEM STATEMENT:
You are given a list of defects. Each defect has a start position and an end position, showing
where it can be detected.
• A vertical beam at position X can detect all defects that include X in their range.
• You need to find the smallest number of vertical beams required to cover all
defects.
• A beam is considered to detect a defect if it is shot as position x, Where xstart <= x
<= xend.
INPUT FORMAT:
Defect_ranges.csv:
start_point,end_point
10,16
2,8
1,6
7,12
Each row represents a defect detection range with:
• start_point → The leftmost position where the defect can be found.
• end_point → The rightmost position where the defect can be found.
OUTPUT FORMAT:
Inspection_paths.csv:
min_paths
2
This means we need at least 2 beams to detect all defects.
HOW IT WORKS:
➔ Each defect has a detection range → [start_point, end_point].
➔ A beam at position X will detect all defects where start_point ≤ X ≤ end_point.
➔ You must place beams in the best positions to cover all defects with as few beams
as possible.
SEMICONDUCTOR WAFER GRID ALIGNMENT
PROBLEM OVERVIEW:
In semiconductor manufacturing, wafer grids must be properly aligned for successful
processing. Each grid cell contains a processing parameter value (represented by a lowercase
letter). To ensure optimal manufacturing conditions, the grid must be row-sorted and column-
sorted.
PROBLEM STATEMENT:
You are given a square grid of size n×n, where each cell contains a specific process
parameter value (represented by a lowercase letter a-z). Your goal is to:
• Determine if it's possible to rearrange the grid such that:
o The values in each row are arranged in strictly increasing order from left to
right.
o The values in each column are arranged in strictly increasing order from top to
bottom.
• You may only sort entire rows, not individual cells or columns.
• After sorting all rows, check if the columns are automatically sorted.
INPUT FORMAT:
wafer_grid.csv:
grid_size
5
ebacd
fghij
olmkn
trpqs
xywuv
Where:
• The first line contains an integer n, the size of the square grid.
• Each of the next n lines contains a string of length n, representing a row of the grid.
OUTPUT FORMAT:
grid_alignment.csv:
result
YES
This means it IS possible to rearrange the grid to meet the sorting requirements.
HOW IT WORKS:
→ Each cell contains a process parameter value (lowercase letter).
→ You can sort each row individually in ascending order.
→ After sorting all rows, check if every column is also sorted in ascending order.
→ If all columns are sorted after sorting the rows, the result is "YES". Otherwise, "NO".
OPTIMAL WAFER INSPECTION STRATEGY
PROBLEM OVERVIEW:
In semiconductor manufacturing, wafers are thin slices of material used to make computer
chips. Before these chips are used in devices, they must be inspected for defects.
Imagine you have a special inspection tool that scans a long strip of wafer segments. Each
segment can have a specific type of defect, and each defect is represented by a number (e.g.,
1, 2, 3, etc.).
However, the inspection tool has a memory limit:
• It can only track up to two different defect types at the same time.
• The scan must be continuous, meaning it cannot skip any segment while inspecting.
If the tool encounters a third defect type, it must reset and start a new inspection from that
segment.
PROBLEM DESCRIPTION:
You will receive a list of wafer defect types in a file (JSON format).
• The list represents a continuous sequence of wafer segments, scanned from left to
right.
• You can start from any wafer (not necessarily from the 1st wafer)
• Each number in the sequence represents a type of defect.
• The tool can only track two types of defects at a time.
You need to determine the maximum number of consecutive segments that can be
inspected before a third defect type forces older defects to be removed.
BEST INSPECTION SEQUENCE:
INPUT:
Input.json:
{
"num_segments": 6,
"segments": [1, 2, 1, 3, 2, 2]
}
• "num_segments" → Total number of segments in the input.
• "segments" → List of defect types for each segment.
OUTPUT:
Output.json:
"max_segments": 3
"max_segments" → Maximum number of consecutive wafer segments that can be inspected
before a third defect type appears.
AUTOMATED WAFER INSPECTION ROBOT NAVIGATION
PROBLEM OVERVIEW:
In advanced semiconductor manufacturing facilities, autonomous robots are deployed to
perform wafer inspection tasks across the fabrication floor. These robots must navigate
efficiently through complex paths while avoiding obstacles, such as equipment racks,
chemical storage units, and human operators.
Your task is to program a navigation system for an advanced wafer inspection robot that
optimizes its movement pattern to maximize coverage distance while successfully avoiding
all obstacles.
ROBOT SPECIFICATIONS:
• The robot begins at the origin point (0, 0) on the clean room floor grid, initially facing
North.
• The robot follows a sequence of movement commands to navigate the fabrication facility.
• Commands are provided as integers:
• -2: Turn left 90 degrees
• -1: Turn right 90 degrees
• 1-9: Move forward X grid units (where X is the given positive integer)
OBSTACLE INFORMATION:
• The clean room contains various obstacles represented as coordinates [x, y].
• The robot cannot pass through positions occupied by obstacles.
• If a command would cause the robot to pass through an obstacle, the robot stops at the grid
position immediately before the obstacle and proceeds with the next command.
PROBLEM DESCRIPTION:
Given the sequence of commands and obstacle locations, determine the maximum Euclidean
squared distance (x² + y²) that the robot achieves from the origin point during its inspection
path.
INPUT:
input.json:
{
"commands": [4, -1, 3, -2, 4],
"obstacles": [[2, 4], [5, 5], [0, 3]]
• "commands": Array of movement instructions for the robot.
• "obstacles": Array of [x, y] coordinates representing obstacle positions.
OUTPUT:
Output.json:
"max_squared_distance": 25
"max_squared_distance": The maximum Euclidean squared distance from the origin
achieved during the robot's movement pattern.
OPTIMAL WAFER DEFECT REPAIR PATH
PROBLEM OVERVIEW:
In advanced semiconductor manufacturing, microscopic defects can appear on wafers during
production. These defects must be repaired using high-precision laser equipment before the
wafers can be used for chip fabrication.
To optimize the repair process, a grid-based model is used to represent the wafer. Each
position in this grid corresponds to a specific repair site, and each site has an associated
repair cost. The cost depends on factors such as defect complexity, equipment calibration
time, and repair duration.
Your task is to determine the minimum total repair cost required to travel from the top row
to the bottom row of the wafer while following specific movement constraints.
REPAIR PROTOCOL:
The repair tool follows these movement rules:
• The repair process starts from any position in the top row.
• It must move row by row downward until reaching the bottom row.
• At each step, the tool can move:
o Directly downward (same column in the next row)
o Diagonally down-left (one column to the left in the next row, if available)
o Diagonally down-right (one column to the right in the next row, if available)
Your goal is to find the minimum total repair cost required to reach the bottom row.
INPUT:
The input is a square grid of repair costs stored in a CSV file.
• Each row represents a horizontal section of the wafer.
• Each value represents the repair cost at that position.
• The tool starts from any position in the first row and must reach the last row.
Input.csv:
2,1,3
6,5,4
7,8,9
OUTPUT:
The output is a single value: the minimum repair cost required to move from the top row to
the bottom row.
Output.csv:
12
WAFER PROCESSING STATION BALANCING
PROBLEM OVERVIEW:
In modern semiconductor manufacturing, wafer processing requires precise balance across
multiple processing stations. Each station contains a stack of wafers that need processing,
with each wafer requiring a specific amount of processing time.
For efficient facility operation, all processing stations must work simultaneously and
complete their tasks at the same time to avoid production bottlenecks. This requires that all
stations have precisely the same total processing time (represented by the height of their
wafer stacks).
Your task is to balance the processing loads by removing wafers from the top of certain
stacks until all stacks have exactly the same total processing time.
PROBLEM DESCRIPTION:
You're given 3 wafer processing stations, each with a stack of wafers. Each wafer has a
specific thickness (represented by a positive integer). The height of a stack is the sum of the
thicknesses of all wafers in that stack.
You can only remove wafers from the top of each stack. You need to determine the maximum
possible identical height that all three stacks can have.
INPUT:
Input.json:
{
"stacks": [
[3, 2, 1, 1, 1],
[4, 3, 2],
[1, 1, 4, 1]
]
}
"stacks": Array of arrays representing wafer stacks, where each inner array contains the
thickness values of each wafer from top to bottom.
OUTPUT:
Output.json:
{
"max_equal_height": 5
}
EXPLANATION:
In the given example:
• Initial stack heights:
o Stack 1: 3 + 2 + 1 + 1 + 1 = 8
o Stack 2: 4 + 3 + 2 = 9
o Stack 3: 1 + 1 + 4 + 1 = 7
To make all stacks equal:
• Remove the top wafer from Stack 1 (3): height becomes 5
• Remove the top two wafers from Stack 2 (4 and 3): height becomes 2
• Remove the top three wafers from Stack 3 (1, 1, and 4): height becomes 1
The maximum equal height possible is 5 (achieved by removing just the top wafer from Stack
1).
CIRCUIT CHIP FAULT PROPAGATION
PROBLEM OVERVIEW:
In modern semiconductor manufacturing, circuit chips can develop faults that propagate to
nearby chips. Each chip has a potential fault radius that affects other chips within that radius.
When a chip's fault is triggered, it can cause a chain reaction, activating faults in other chips
within its radius, which in turn can trigger more chips.
For efficient quality control, engineers need to identify which chip, if triggered first, would
cause the maximum number of chips to fail through this chain reaction. This requires
analyzing the propagation patterns of potential faults across the manufacturing grid.
Your task is to determine the maximum number of chips that can fail if you optimally select
the first chip to trigger.
PROBLEM DESCRIPTION:
You're given N circuit chips on a 2D grid. Each chip has coordinates (x, y) and a fault radius
r. When a chip's fault is triggered, it affects all other chips within its radius, causing them to
fail as well. A chip is within the fault radius if the Euclidean distance between the chips is
less than or equal to the radius.
This fault propagation continues as a chain reaction - any newly affected chip will trigger its
own fault radius, potentially affecting more chips, and so on.
You need to determine, if you could choose any one chip to trigger initially, what is the
maximum number of chips that would eventually fail through this chain reaction.
INPUT:
input.json:
{
"chips": [
[2, 1, 3],
[6, 1, 4],
[4, 7, 2],
[2, 3, 1],
[2, 8, 1]
]
}
"chips": Array of arrays where each inner array [x, y, r] represents a chip's x-coordinate, y-
coordinate, and fault radius.
OUTPUT:
output.json:
{
"max_affected_chips": 5
}
In the given example:
• We have 5 chips with their positions and fault radii.
• If we trigger chip 0 (at position [2,1] with radius 3):
o Chip 0 directly affects chip 3 since the distance between them is 2, which is
less than the radius of chip 0.
o Chip 3 doesn't affect any new chips.
o So triggering chip 0 affects a total of 2 chips.
• If we trigger chip 1 (at position [6,1] with radius 4):
o Chip 1 directly affects chips 0, 2, and 3.
o Chip 0 then affects chip 3 (already affected).
o Chip 2 affects chip 4.
o So triggering chip 1 affects all 5 chips through this chain reaction.
Therefore, the maximum number of chips that can be affected is 5, achieved by triggering
chip 1 initially.
VALIDATOR GUIDE
STEP 1: Enter Contest ID
➔ This is how the entry page looks like.
➔ Enter the contest, with the given Contest ID.
STEP 2: Sign In with Google
STEP 3: Access the milestones, test cases and input files.
➔ Access the milestones from the 1st drop-down menu.
➔ For each milestone, you’ll have 1 to n test cases.
➔ You can move to next test case, only after solving the previous one.
Download problem statement:
You can download the current milestone’s problem statement using given button.
Download input file:
You can download the current test case’s input file from the given button.
Upload your output:
Upload your output file through using this button, to validate your output.
STEP 4: Output validation
➔ Your output will be validated and score will be displayed.
ALL THE BEST !