|
10 | 10 | "_readme_examples": { |
11 | 11 | "list": [ |
12 | 12 | { |
13 | | - "content": "\n\n```\nInput: root = [10,5,-3,3,2,null,11,3,-2,null,1], targetSum = 8\nOutput: 3\nExplanation: The paths that sum to 8 are shown.\n```" |
| 13 | + "content": "\n\n```\nInput: root = [10,5,-3,3,2,None,11,3,-2,None,1], targetSum = 8\nOutput: 3\nExplanation: The paths that sum to 8 are shown.\n```" |
14 | 14 | }, |
15 | 15 | { |
16 | | - "content": "```\nInput: root = [5,4,8,11,null,13,4,7,2,null,null,5,1], targetSum = 22\nOutput: 3\n```" |
| 16 | + "content": "```\nInput: root = [5,4,8,11,None,13,4,7,2,None,None,5,1], targetSum = 22\nOutput: 3\n```" |
17 | 17 | } |
18 | 18 | ] |
19 | 19 | }, |
|
47 | 47 | "list": [{ "name": "setup_method", "parameters": "", "body": "self.solution = Solution()" }] |
48 | 48 | }, |
49 | 49 | "playground_imports": "from helpers import run_path_sum, assert_path_sum\nfrom solution import Solution\nfrom leetcode_py import TreeNode", |
50 | | - "playground_setup": "# Example test case\nroot_list: list[int | None] = [10,5,-3,3,2,null,11,3,-2,null,1]\ntarget_sum = 8\nexpected = 3", |
| 50 | + "playground_setup": "# Example test case\nroot_list: list[int | None] = [10,5,-3,3,2,None,11,3,-2,None,1]\ntarget_sum = 8\nexpected = 3", |
51 | 51 | "playground_run": "result = run_path_sum(Solution, root_list, target_sum)\nresult", |
52 | 52 | "playground_assert": "assert_path_sum(result, expected)", |
53 | 53 | "_test_methods": { |
|
58 | 58 | "parametrize": "root_list, target_sum, expected", |
59 | 59 | "test_cases": { |
60 | 60 | "list": [ |
61 | | - "([10,5,-3,3,2,null,11,3,-2,null,1], 8, 3)", |
62 | | - "([5,4,8,11,null,13,4,7,2,null,null,5,1], 22, 3)", |
| 61 | + "([10,5,-3,3,2,None,11,3,-2,None,1], 8, 3)", |
| 62 | + "([5,4,8,11,None,13,4,7,2,None,None,5,1], 22, 3)", |
63 | 63 | "([], 1, 0)", |
64 | 64 | "([1], 1, 1)", |
65 | 65 | "([1], 0, 0)", |
66 | | - "([1,2], 3, 2)", |
| 66 | + "([1,2], 3, 1)", |
67 | 67 | "([1,2,3], 3, 2)", |
68 | 68 | "([1,2,3], 5, 0)", |
69 | 69 | "([1,-2,3], 1, 1)", |
70 | | - "([1,-2,3], 2, 1)", |
| 70 | + "([1,-2,3], 2, 0)", |
71 | 71 | "([1,-2,-3], -3, 1)", |
72 | 72 | "([0,1,1], 1, 4)", |
73 | 73 | "([1,0,1,0,1], 1, 6)", |
74 | 74 | "([0], 0, 1)", |
75 | | - "([-3,-2,1,1,1], -1, 4)" |
| 75 | + "([-3,-2,1,1,1], -1, 2)" |
76 | 76 | ] |
77 | 77 | }, |
78 | 78 | "body": " result = run_path_sum(Solution, root_list, target_sum)\n assert_path_sum(result, expected)" |
79 | 79 | } |
80 | 80 | ] |
81 | 81 | }, |
82 | | - "playground_test_case": "root_list: list[int | None] = [10,5,-3,3,2,null,11,3,-2,null,1]\ntarget_sum = 8", |
| 82 | + "playground_test_case": "root_list: list[int | None] = [10,5,-3,3,2,None,11,3,-2,None,1]\ntarget_sum = 8", |
83 | 83 | "playground_execution": "result = run_path_sum(Solution, root_list, target_sum)", |
84 | 84 | "playground_assertion": "assert_path_sum(result, 3)" |
85 | 85 | } |
0 commit comments