I enjoy using binarytree, especially find printing useful in ipython.
I thought it would be fun to add a new property is_symmetric to properties. This comes up sometimes as an exercise with trees -- is it symmetric (a mirror of itself).
Also wanted to learn more about the doctest and coverage modules 👍
Updates
Add new property and function to calculate if binary tree is symmetric
Coverage remained the same at 100.0% when pulling 352374976c267762458663d263c418c3c2d5d250 on gillespiecd:symmetric into 23cb6f1e60e66b96133259031e97ec03e932ba13 on joowani:dev.
Coverage remained the same at 100.0% when pulling c0a796d9bb02db7f819111ea0c878440b10595d3 on gillespiecd:symmetric into 23cb6f1e60e66b96133259031e97ec03e932ba13 on joowani:dev.
Background
I enjoy using
binarytree
, especially find printing useful inipython
.I thought it would be fun to add a new property
is_symmetric
to properties. This comes up sometimes as an exercise with trees -- is it symmetric (a mirror of itself).Also wanted to learn more about the doctest and coverage modules 👍
Updates
Steps to Reproduce