Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find sum of all right leaves in a given Binary Tree . #147

Open
maneprajakta opened this issue Oct 2, 2020 · 1 comment
Open

Find sum of all right leaves in a given Binary Tree . #147

maneprajakta opened this issue Oct 2, 2020 · 1 comment

Comments

@maneprajakta
Copy link

maneprajakta commented Oct 2, 2020

In Tree data structure i want to add how to find sum of all right leaves in BST.
I can do this in C++ along with an explanation can I do this .

@maneprajakta maneprajakta changed the title In Tree data structure i want to add In Tree data structure i want to add how to find sum of all right leaves in a given Binary Tree . Oct 2, 2020
@maneprajakta maneprajakta changed the title In Tree data structure i want to add how to find sum of all right leaves in a given Binary Tree . Find sum of all right leaves in a given Binary Tree . Oct 2, 2020
@satyamsaran
Copy link

The idea is to traverse the tree starting from the root and check if the node is the leaf node or not. If the node is the right leaf than add data of right leaf to sum variable.

I can code it in c++ if you assign me.

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

No branches or pull requests

2 participants