Python Library for Studying Binary Trees
str
type node values. The values are compared using Python's default string comparators.binarytree.tree
, binarytree.heap
and binarytree.bst
now accept a new letters: bool
parameter. If set to True
(default: False
), the generated tree nodes will have uppercase string values like "A"
.Node.value
to Node.val
to play nicely with leetcode. Node.value
should still work for the most part, but it is kept only for backward compatibility and will be removed in the future.is_symmetric
.