Tag: same tree

  • Same Tree or Not?

    Given the root node of two trees, find if they are the same . For example: The below trees: [1,2,3] and [1,2,3] are the same [1,2] and [1,2,3] are not same. Note that though the given input is two arrays above, you can’t just compare each value of one array with the other array. The…