Arranging Coins

Easy · Binary Search · about 10 minutes

Asked at Bloomberg, Microsoft, Amazon, Google, Meta.

You have n coins and build a staircase: row k needs exactly k coins. Return the number of complete rows.

Related guides