GARENA Hiring Challenge | Off-Campus OA (2024) | Stamping the Sequence Problem

Question · Posted Jun 2026

Problem Statement You are given two strings: stamp – a pattern string. target – a target string. Initially, you have a string consisting entirely of '?' characters of the same length as target. In one move, you can place the stamp over any valid position in the current string and overwrite the corresponding characters. Your task is to find a sequence of stamping positions that can transform the initial string into the target string. Return the sequence of positions used ...

The full answer & interview discussion are available to premium members.

Log in Create a free account