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

is Balanced #13

Open
rishabh3112 opened this issue Jul 6, 2018 · 1 comment
Open

is Balanced #13

rishabh3112 opened this issue Jul 6, 2018 · 1 comment
Labels
improvement function implemented can be improved problem Implement new Function for given question

Comments

@rishabh3112
Copy link
Owner

Question

Given a binary tree, check if its balanced i.e. depth of left and right subtrees of every node differ by at max 1. Return true if given binary tree is balanced, false otherwise.

Input format

Elements in level order form (separated by space). 
If any node does not have left or right child, take -1 in its place.

Output format
boolean

@rishabh3112 rishabh3112 added the problem Implement new Function for given question label Jul 6, 2018
@rishabh3112
Copy link
Owner Author

Use Pair approch to solve the problem @bhavya9107 and @rishabh3112

@rishabh3112 rishabh3112 reopened this Jul 6, 2018
@rishabh3112 rishabh3112 added the improvement function implemented can be improved label Jul 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement function implemented can be improved problem Implement new Function for given question
Projects
None yet
Development

No branches or pull requests

1 participant