I want to find out whether binary tree T2 is a subtree of of binary tree T1. I read that one could build string representations for T2 and T1 using pre-order and in-
The definition of sub-tree of a tree should be same as the definition of sub-string of a string. Think of it like this: 1. sub-string has begins-with, contains and ends-with. 2. Tree should also have the same definition but generalized to suit the Tree data structure. 3. The generalization is from 1 dimensional for string to 2 dimensional for tree.