Skip to content

Commit c1298da

Browse files
authored
Improved task 437
1 parent 8662dcb commit c1298da

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ Python-based LeetCode algorithm problem solutions, regularly updated.
453453
| <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- --> | <!-- -->
454454
|-|-|-|-|-|-
455455
| 0543 |[Diameter of Binary Tree](src/main/python/g0501_0600/s0543_diameter_of_binary_tree/Solution.py)| Easy | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Big_O_Time_O(n)_Space_O(n) | 3 | 94.30
456-
| 0437 |[Path Sum III](src/main/python/g0401_0500/s0437_path_sum_iii/Solution.py)| Medium | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, LeetCode_75_Binary_Tree/DFS, Big_O_Time_O(n)_Space_O(n) | 6 | 68.63
456+
| 0437 |[Path Sum III](src/main/python/g0401_0500/s0437_path_sum_iii/Solution.py)| Medium | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, LeetCode_75_Binary_Tree/DFS, Big_O_Time_O(n)_Space_O(n) | 0 | 100.00
457457

458458
#### Day 8 Binary Search
459459

@@ -1602,7 +1602,7 @@ Python-based LeetCode algorithm problem solutions, regularly updated.
16021602
| 0543 |[Diameter of Binary Tree](src/main/python/g0501_0600/s0543_diameter_of_binary_tree/Solution.py)| Easy | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, Level_2_Day_7_Tree, Udemy_Tree_Stack_Queue, Big_O_Time_O(n)_Space_O(n) | 3 | 94.30
16031603
| 0494 |[Target Sum](src/main/python/g0401_0500/s0494_target_sum/Solution.py)| Medium | Array, Dynamic_Programming, Backtracking, Big_O_Time_O(n\*(sum+s))_Space_O(n\*(sum+s)) | 59 | 77.59
16041604
| 0438 |[Find All Anagrams in a String](src/main/python/g0401_0500/s0438_find_all_anagrams_in_a_string/Solution.py)| Medium | Top_100_Liked_Questions, String, Hash_Table, Sliding_Window, Algorithm_II_Day_5_Sliding_Window, Programming_Skills_II_Day_12, Level_1_Day_12_Sliding_Window/Two_Pointer, Big_O_Time_O(n+m)_Space_O(1) | 54 | 54.80
1605-
| 0437 |[Path Sum III](src/main/python/g0401_0500/s0437_path_sum_iii/Solution.py)| Medium | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, LeetCode_75_Binary_Tree/DFS, Level_2_Day_7_Tree, Big_O_Time_O(n)_Space_O(n) | 6 | 68.63
1605+
| 0437 |[Path Sum III](src/main/python/g0401_0500/s0437_path_sum_iii/Solution.py)| Medium | Top_100_Liked_Questions, Depth_First_Search, Tree, Binary_Tree, LeetCode_75_Binary_Tree/DFS, Level_2_Day_7_Tree, Big_O_Time_O(n)_Space_O(n) | 0 | 100.00
16061606
| 0416 |[Partition Equal Subset Sum](src/main/python/g0401_0500/s0416_partition_equal_subset_sum/Solution.py)| Medium | Top_100_Liked_Questions, Array, Dynamic_Programming, Level_2_Day_13_Dynamic_Programming, Big_O_Time_O(n\*sums)_Space_O(n\*sums) | 564 | 63.45
16071607
| 0394 |[Decode String](src/main/python/g0301_0400/s0394_decode_string/Solution.py)| Medium | Top_100_Liked_Questions, String, Stack, Recursion, LeetCode_75_Stack, Level_1_Day_14_Stack, Udemy_Strings, Big_O_Time_O(n)_Space_O(n) | 0 | 100.00
16081608
| 0347 |[Top K Frequent Elements](src/main/python/g0301_0400/s0347_top_k_frequent_elements/Solution.py)| Medium | Top_100_Liked_Questions, Array, Hash_Table, Sorting, Heap_Priority_Queue, Counting, Divide_and_Conquer, Quickselect, Bucket_Sort, Data_Structure_II_Day_20_Heap_Priority_Queue, Big_O_Time_O(n\*log(n))_Space_O(k) | 4 | 69.79

src/main/python/g0401_0500/s0437_path_sum_iii/Solution.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# #Medium #Top_100_Liked_Questions #Depth_First_Search #Tree #Binary_Tree
22
# #LeetCode_75_Binary_Tree/DFS #Level_2_Day_7_Tree #Big_O_Time_O(n)_Space_O(n)
3-
# #2025_07_25_Time_6_ms_(68.63%)_Space_18.23_MB_(71.08%)
3+
# #2025_07_26_Time_0_ms_(100.00%)_Space_18.23_MB_(71.00%)
44

55
# Definition for a binary tree node.
66
# class TreeNode:
@@ -9,7 +9,7 @@
99
# self.left = left
1010
# self.right = right
1111
class Solution:
12-
def pathSum(self, root: TreeNode, targetSum: int) -> int:
12+
def pathSum(self, root: Optional[TreeNode], targetSum: int) -> int:
1313
def dfs(node: TreeNode, targetSum: int, curr_sum: int) -> None:
1414
if not node:
1515
return

0 commit comments

Comments
 (0)