codezonediitj / pydatastructs

A python package for data structures and algorithms
https://pydatastructs.readthedocs.io/en/stable/
Other
202 stars 270 forks source link

Add C++ backend for all the trees present in `binary_trees.py` #550

Open czgdp1807 opened 11 months ago

czgdp1807 commented 11 months ago

Description of the problem

https://github.com/codezonediitj/pydatastructs/blob/main/pydatastructs/trees/binary_trees.py

Follow the pattern of C++ backend in linear_data_structures module.

Check https://github.com/codezonediitj/pydatastructs/tree/main/pydatastructs/linear_data_structures/_backend/cpp

Example of the problem

References/Other comments

czgdp1807 commented 11 months ago

@Kishan-Ved Go ahead and take this up.

Kishan-Ved commented 11 months ago

Sure, I'll start working on this. Thank you!

Kishan-Ved commented 11 months ago

I've spent the day reading and understanding backend implementation of search algorithms. However, I'm finding it difficult to understand how to start the implementation from scratch, which files to include and which already defined utils to use. Can you please commit some starting code, which has files created with necessary imports and the BinaryTree class' backend implemented in c++. (it is a small code defined in binary_trees.py). Also please let me know if nodes are already defined in c++ backend. This will help me understand and reuse the code to implement other classes.

czgdp1807 commented 11 months ago

I won’t be able to do that. Try checking how OneDimensionalArray is implemented. Follow the same pattern here.

Kishan-Ved commented 11 months ago

Please check this once: #551

Kishan-Ved commented 4 months ago

The C++ backend is complete, we can close this issue now.