Given the roots of two binary trees, rootA and rootB, determine if Tree A contains Tree B as a subtree, where both node values and child orientations (left vs. right) must match identically.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.