← Goldman Sachs questions

Minimum steps to reach target

Filed under Goldman Sachs

Given an infinite number line, you start at 0 and want to reach a target value. In the i-th move, you can either take a step of size i to the left or right. Return the minimum number of steps required…

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.