SarthakKeshari / Java-Questions-and-Solutions

This repository aims to solve and create new problems from different spheres of coding. A path to help students to get access to solutions and discuss their doubts.
MIT License
47 stars 98 forks source link

CountingFullNodes.java #370

Open aarzoopundir opened 3 years ago

aarzoopundir commented 3 years ago

Issue Id you have worked upon -

Kindly write your answer here

Briefly explain your program logic -

Full nodes are the ones whose left and right children are not null. So the idea is to traverse the tree in postorder. If the current node is full, we increment result by 1 and add returned values of left and right subtrees.

Screenshots(Attach 2 screenshots of your own input and output) -

Attach here


Checklist:

Eg - If your code follow the below guidelines. Kindly change [] to [x]

All the conditions should be fulfilled for considering your code for merging -

SarthakKeshari commented 3 years ago

@aarzoopundir, 13 files have been altered leading to conflicts in the repo. Kindly look into it

SarthakKeshari commented 3 years ago

@aarzoopundir, This PR will be marked as invalid and be closed by 13/10/2021(6PM). Kindly respond by either closing it or making the required changes.