From faeb83a0729e3a72b2b2537e957dfa5d3897de7e Mon Sep 17 00:00:00 2001 From: bt3gl <138340846+bt3gl-cryptographer@users.noreply.github.com> Date: Tue, 8 Aug 2023 13:49:24 -0700 Subject: [PATCH] Update bt_height.py --- trees/bt_height.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trees/bt_height.py b/trees/bt_height.py index 32fbc7d..b10b178 100644 --- a/trees/bt_height.py +++ b/trees/bt_height.py @@ -5,7 +5,7 @@ def height(root): - if not root: + if root is None: return 0 return 1 + max(height(root.left), height(root.right))