feat(content): function signatures + test cases
This commit is contained in:
@@ -9,6 +9,28 @@ categories:
|
||||
patterns:
|
||||
- greedy
|
||||
|
||||
function_signature: "def convert_to_base7(num: int) -> str:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { num: 100 }
|
||||
expected: "202"
|
||||
- input: { num: -7 }
|
||||
expected: "-10"
|
||||
hidden:
|
||||
- input: { num: 0 }
|
||||
expected: "0"
|
||||
- input: { num: 7 }
|
||||
expected: "10"
|
||||
- input: { num: 1 }
|
||||
expected: "1"
|
||||
- input: { num: -1 }
|
||||
expected: "-1"
|
||||
- input: { num: 49 }
|
||||
expected: "100"
|
||||
- input: { num: -100 }
|
||||
expected: "-202"
|
||||
|
||||
description: |
|
||||
Given an integer `num`, return *a string of its **base 7** representation*.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user