Binary Tree - 37: Check if two Binary Trees are Isomorphic

preview_player
Показать описание

Solution:
- We need to check, if i move a node to left or right & it's matching with other tree
- So other subtree can be same structure or mirror structure, then it's mirror structure
- Recursively check left-left & right-right of both tree or check left-right & right-left
- If both nodes are null, return true, if any one node is null, return false

Do Watch video for more info

This Problem is synonym of following problems:
binary tree check if isomorphic tree,
binary tree if two trees are isomorphic,
check if isomorphic tree,
binary tree check if both trees are isomorphic tree,

Please check video for more info:

CHECK OUT CODING SIMPLIFIED

★☆★ VIEW THE BLOG POST: ★☆★

I started my YouTube channel, Coding Simplified, during Dec of 2015.
Since then, I've published over 200+ videos.

★☆★ SUBSCRIBE TO ME ON YOUTUBE: ★☆★

★☆★ Send us mail at: ★☆★

Рекомендации по теме
Комментарии
Автор

Time complexity calcualtions are wrong

piyushkumawat
Автор

I got a doubt what if root node data for both the tree is not same still it shows true right???

nagavarma
Автор

thanks, but request to make videos using c language, bcz everyone doesn't know about java, maximum know c programming

fardilviews
visit shbcf.ru