I need some sort of tree collection that is able to store basic child-parent relationships and next simple operations:
- IsParent(thisNode, otherNode) (recursively one of any level parents)
- IsChild(thisNode, otherNode) (recursively one of any level child's)
- GetLevel(node) Get the level of a node.
This collection should be fast and can be immutable I don't need to change the tree. There are o lot of trees collection and I don't know what kind of tree do I need.
Do you know such collection in Python?