feat: add Parent Pointer Tree
References to Issue
Resolves #325
Brief description of what is implemented
- Added parent pointer tree for python backend
- Added parent pointer tree tests
In my opnion, for add a new data structure or algorithm for public, the final interception is reserved by czgdp1807.
First step is append the class or function in the beginning array __all__ of the file. Like:
__all__ = [
'MAryTree',
'ParentPointerTree'
]
Secondly, add the API in the module's __init__.py file. Like
from .m_ary_trees import (
MAryTreeNode, MAryTree,
ParentPointerTreeNode, ParentPointerTree
)
For ParentPointerTreeNode, you can check the above steps.
Three, after above two steps, you can import ParentPointerTree by
from pydatastructs import MAryTree, ParentPointerTree
Lastly, update your new datastructure in docs.
Yea, points 1, 2, and 4 are valid. I had forgotten to add them.
As for point 3, I was following the importing style in the other files. In the other files, they important it differently. For example,
from pydatastructs.linear_data_structures.arrays import ArrayForTrees
However, The points are nice regardless thanks :)