Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adding Check if a binary tree is subtree of another binary tree #123

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

Conversation

Copy link

@abuasifkhan abuasifkhan commented Oct 21, 2019

Adding and exporting a function that can take two arguments as source tree and the tree that has to be matched and checks if the second tree is the subtree of the source tree.

Logic from: https://www.geeksforgeeks.org/check-if-a-binary-tree-is-subtree-of-another-binary-tree/

ashokdey reacted with thumbs up emoji
Copy link
Member

@TheSTL TheSTL left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @abuasifkhan
Changes required:

  • Fix variable
  • Add time complexity. You can check this problem to get an idea get_subsequence

abuasifkhan reacted with thumbs up emoji ashokdey reacted with hooray emoji
Copy link
Author

@TheSTL, I've implemented the suggestions you added. Please approve the changes in everything looks good.

Copy link
Member

@TheSTL TheSTL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @abuasifkhan 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@TheSTL TheSTL TheSTL approved these changes

Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /