feat(content): hidden test cases
This commit is contained in:
@@ -27,6 +27,12 @@ test_cases:
|
||||
expected: [0, 1, 1, 2, 1, 2, 2, 3]
|
||||
- input: { n: 10 }
|
||||
expected: [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2]
|
||||
- input: { n: 3 }
|
||||
expected: [0, 1, 1, 2]
|
||||
- input: { n: 15 }
|
||||
expected: [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4]
|
||||
- input: { n: 4 }
|
||||
expected: [0, 1, 1, 2, 1]
|
||||
|
||||
description: |
|
||||
Given an integer `n`, return an array `ans` of length `n + 1` such that for each `i` (`0 <= i <= n`), `ans[i]` is the **number of `1`'s** in the binary representation of `i`.
|
||||
|
||||
Reference in New Issue
Block a user