feat(content): function signatures + test cases

This commit is contained in:
2025-07-13 19:53:34 +01:00
parent 9e6c6d256f
commit 65a8d525f5
203 changed files with 4526 additions and 0 deletions

View File

@@ -9,6 +9,26 @@ categories:
patterns:
- binary-search
function_signature: "def arrange_coins(n: int) -> int:"
test_cases:
visible:
- input: { n: 5 }
expected: 2
- input: { n: 8 }
expected: 3
hidden:
- input: { n: 1 }
expected: 1
- input: { n: 3 }
expected: 2
- input: { n: 6 }
expected: 3
- input: { n: 10 }
expected: 4
- input: { n: 100 }
expected: 13
description: |
You have `n` coins and you want to build a staircase with these coins. The staircase consists of `k` rows where the i<sup>th</sup> row has exactly `i` coins. The last row of the staircase **may be** incomplete.