add is_leaf() method
Some checks failed
Run tests / test (push) Failing after 15s
Code Quality / lint (push) Successful in 16s

This commit is contained in:
2026-01-25 23:49:39 +01:00
parent b3811a26fa
commit 133f432c45

View File

@@ -13,6 +13,9 @@ class Tree:
return f"{leaf}"
return "<empty>"
def is_leaf(self):
return self.left == None and self.right == None
def build_tree(args):
if args == None:
return None