← Goldman Sachs questions

Find minimum moves to reach target on an infinite line

Filed under Goldman Sachs

Starting at 0 on an infinite number line, you make moves of length 1, 2, 3, ..., i. Find the minimum number of moves to reach a target integer position. The direction of each move can be positive or…

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 Goldman Sachs questions

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