feat(content): more test cases

This commit is contained in:
2025-07-13 19:25:39 +01:00
parent 98ebb1600f
commit 16b02451d0
94 changed files with 1840 additions and 0 deletions

View File

@@ -11,6 +11,24 @@ patterns:
- bfs
- tree-traversal
function_signature: "def max_depth(root: TreeNode | None) -> int:"
test_cases:
visible:
- input: { root: [3, 9, 20, null, null, 15, 7] }
expected: 3
- input: { root: [1, null, 2] }
expected: 2
- input: { root: [] }
expected: 0
hidden:
- input: { root: [1] }
expected: 1
- input: { root: [1, 2, 3, 4, 5] }
expected: 3
- input: { root: [1, 2, null, 3, null, 4] }
expected: 4
description: |
Given the `root` of a binary tree, return *its maximum depth*.