AlgoMaster Logo

Subtree of Another Tree

tree=[3, 4, 5, 1, 2],subTree=[4, 1, 2]
0 / 14
algomaster.io
Step:Start: visit every node of root and check whether the tree rooted there is identical to subRoot