Update bt_has_path_sum.py

This commit is contained in:
bt3gl 2023-08-08 14:37:44 -07:00 committed by GitHub
parent ff3987dffc
commit b91db08a40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,8 @@
# -*- coding: utf-8 -*-
# author: bt3gl
def has_path_sum(root: Optional[Node], target_sum: int) -> bool:
def has_path_sum(root, target_sum) -> bool:
def transverse(node, sum_here=0):