← Morgan Stanley questions
CodingReported in a candidate post, Jul 2020

Check if Binary Tree is Subtree of Another

Filed under Morgan Stanley

Given two binary trees, root1 and root2, return true if root2 is a subtree of root1, meaning there is a node in root1 with the same structure and node values as root2.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Morgan Stanley questions

Collected from public candidate posts and coding forums. Updated Nov 2026.