ajay-dhangar / algo

This repository contains a collection of data structures and algorithms implemented in various programming languages. It is designed to help learners understand key concepts through hands-on examples. Contributions and improvements are welcome!
https://ajay-dhangar.github.io/algo/
MIT License
40 stars 126 forks source link

[Feature Request] Post-order traversal of a binary search tree (BST) #634

Open nishant4500 opened 1 day ago

nishant4500 commented 1 day ago

Feature Request

Is your feature request related to a problem? Please describe. Currently, the application does not support post-order traversal for binary search trees. While other traversal methods (such as in-order and pre-order) are available, post-order traversal is missing, which limits the ability to process nodes in a left → right → root order.

Describe the solution you'd like

I would like to add post-order traversal functionality to the binary search tree module. This will allow users to traverse and process the tree in the left subtree → right subtree → root order, which is particularly useful in certain tree-based algorithms like deletion operations and expression tree evaluations.

Describe alternatives you've considered An alternative could be manually implementing post-order traversal in each application that requires it, but that would lead to code duplication and a lack of consistency in how tree traversals are handled across the system.

Additional context Adding post-order traversal will complete the set of standard binary tree traversal methods and make the tree module more robust for different use cases.


Would you like to work on this feature?

github-actions[bot] commented 1 day ago

👋 Hi @nishant4500! Thanks for opening this issue. We appreciate your contribution to the Algo project. Our team will review it soon.

nishant4500 commented 1 day ago

@ajay-dhangar can you please look into this and i also done this please merged it https://github.com/ajay-dhangar/algo/issues/569

nishant4500 commented 1 day ago

635 .done

nishant4500 commented 5 hours ago

@ajay-dhangar can you please look into this for mergeing