From f47e922a3ddaf5bc3cfcbe29079b739d36690998 Mon Sep 17 00:00:00 2001 From: thestar19 <> Date: Wed, 3 Mar 2021 17:10:33 +0100 Subject: [PATCH] fix: max_path_sum had bad bug #758 --- algorithms/tree/max_path_sum.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/algorithms/tree/max_path_sum.py b/algorithms/tree/max_path_sum.py index 7f630fe6b..e437948fd 100644 --- a/algorithms/tree/max_path_sum.py +++ b/algorithms/tree/max_path_sum.py @@ -1,6 +1,6 @@ def max_path_sum(root): maximum = float("-inf") - helper(root, maximum) + maximum = helper(root, maximum) return maximum