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

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

Conversation

abuasifkhan
Copy link

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/

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.

Hi @abuasifkhan
Changes required:

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

@abuasifkhan
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants