Solution to find if tree1 is sub tree of tree2