Skip to content

feat: add Parent Pointer Tree#662

Open
FamALouiz wants to merge 10 commits into
codezonediitj:mainfrom
FamALouiz:feature/Parent-Pointer-Tree
Open

feat: add Parent Pointer Tree#662
FamALouiz wants to merge 10 commits into
codezonediitj:mainfrom
FamALouiz:feature/Parent-Pointer-Tree

Conversation

@FamALouiz

Copy link
Copy Markdown

References to Issue

Resolves #325

Brief description of what is implemented

  • Added parent pointer tree for python backend
  • Added parent pointer tree tests

@LostSnowfluff

Copy link
Copy Markdown
Contributor

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.

@FamALouiz

Copy link
Copy Markdown
Author

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Parent pointer tree

2 participants