← Samsung questions

Frog jump in a 2D matrix minimizing vertical jumps

Filed under Samsung

Given a 2D matrix where 1 represents reachable terrain and 0 is empty space, a frog can move horizontally along consecutive 1s with 0 cost. A vertical jump to another 1 incurs a cost equal to the…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Samsung questions

Collected from public candidate posts and coding forums. Updated Nov 2026.