← Goldman Sachs questions

Maximum rows of coins

Filed under Goldman Sachs

You have n coins and want to build a staircase with them. The k-th row has exactly k coins. Given the total number of coins n, return the number of complete rows that can be formed.

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.