Subtree of Another Tree

Try to solve the Subtree of Another Tree problem.

Statement

Given the roots of two binary trees, root and subRoot, return TRUE if there is a subtree of root with the same structure and nodes as subRoot. Otherwise, return FALSE.

A tree can only be considered a subtree of the root ...

Access this course and 1400+ top-rated courses and projects.