mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-30 04:36:08 -04:00
Update has_path_sum.py
This commit is contained in:
parent
f6477288e1
commit
93c8e2abf7
@ -1,3 +1,7 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# author: bt3gl
|
||||||
|
|
||||||
def has_path_sum(root: Optional[TreeNode], target_sum: int) -> bool:
|
def has_path_sum(root: Optional[TreeNode], target_sum: int) -> bool:
|
||||||
|
|
||||||
def transverse(node, sum_here=0):
|
def transverse(node, sum_here=0):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user