feat(content): function signatures + test cases
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user