feat(content): function signatures + test cases
This commit is contained in:
@@ -10,6 +10,28 @@ patterns:
|
||||
- dfs
|
||||
- dynamic-programming
|
||||
|
||||
function_signature: "def rob(root: TreeNode) -> int:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { root: [3, 2, 3, null, 3, null, 1] }
|
||||
expected: 7
|
||||
- input: { root: [3, 4, 5, 1, 3, null, 1] }
|
||||
expected: 9
|
||||
hidden:
|
||||
- input: { root: [1] }
|
||||
expected: 1
|
||||
- input: { root: [1, 2, 3] }
|
||||
expected: 5
|
||||
- input: { root: [4, 1, null, 2, null, 3] }
|
||||
expected: 7
|
||||
- input: { root: [2, 1, 3, null, 4] }
|
||||
expected: 7
|
||||
- input: { root: [0, 0, 0, 0, 0] }
|
||||
expected: 0
|
||||
- input: { root: [1, null, 2, null, 3, null, 4] }
|
||||
expected: 6
|
||||
|
||||
description: |
|
||||
The thief has found himself a new place for his thievery again. There is only one entrance to this area, called `root`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user