menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Check if 2...
source image

Prodevelopertutorial

1M

read

171

img
dot

Image Credit: Prodevelopertutorial

Check if 2 binary tree are identical

  • To check if two binary trees are identical, we need to compare their node values.
  • If both nodes are null, return true.
  • If the left node value of tree 1 is equal to the left node value of tree 2, return true.
  • If a node from tree 1 has a value and the corresponding node from tree 2 is null, return false.

Read Full Article

like

10 Likes

For uninterrupted reading, download the app