Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt

For a binary tree T, we can define a flip operation as follows: choose any node, and swap the left and right child subtrees.A  A binary tree X is flip equivalent to a binary tree Y if and only if we can make X equal to Y after some number of flip operations.Write  Write a function that determines whether two binary trees are flip equivalent. The trees are given by root nodes root1 and root2.

...