Given two binary trees, tree1 and tree2, determine if tree2 is a subtree of tree1. If it is, return the total number of nodes in tree2; otherwise, return 0.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.