This is a fork of repo : anoopj - pysplay
-
I added the field data for each node, so every node can carry informations or a pointer.
-
The function furthestNode() returns the lowest leaf of the tree (the node with greatest diameter from root), complexity is O(n). It can be easily improved, but complexity should not change. It uses recursive function heightNode(node) to inspect all nodes.
You could raise new issues or pull requests for this repo. You should find my email in account details.