AlgoMaster Logo

Subtree of Another Tree

tree=[3, 4, 5, 1, 2],subTree=[4, 1, 2]
0 / 12
rootsubRoot34512412stackdoes root contain a copy of subRoot?
algomaster.io
Step:Start: does root contain a subtree identical to subRoot?