Search
⌘K

Leetcode 441. Arranging Coins

Find the largest k such that the triangular number 1+2+…+k ≤ n (i.e., k(k+1)/2 ≤ n); equivalently compute the maximum number of complete staircase rows — solvable by solving the quadratic or via integer binary search.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.