Skip to content

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