This problem composes the "same tree" check with a tree traversal, demonstrating how to build complex solutions from simpler building blocks.
Enable JavaScript for the full StreamPrep guide.