Search⌘ K
AI Features

Subtree of Another Tree

Subtree of Another Tree asks whether a binary tree contains a subtree identical in structure and values to a given second binary tree, including all descendants.

Statement

Given the roots of two binary trees, root and subRoot, ...