4

PROBLEM OF THE DAY: 03/09/2023 | Check if Tree is Isomorphic

 1 year ago
source link: https://www.geeksforgeeks.org/videos/problem-of-the-day-03092023-check-if-tree-is-isomorphic/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

PROBLEM OF THE DAY: 03/09/2023

September 04, 2023 |180 Views
PROBLEM OF THE DAY: 03/09/2023 | Check if Tree is Isomorphic
Tree, Problem of the Day, GFG SDE Sheet
 Save  Share  1 Like
Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Siddharth Hazra. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of binary-tree but will also help you build up problem-solving skills.

In this problem, we are given two Binary Trees. Check whether they are Isomorphic or not.

Note: 
Two trees are called isomorphic if one can be obtained from another by a series of flips, i.e. by swapping left and right children of several nodes. Any number of nodes at any level can have their children swapped. Two empty trees are isomorphic.

Example :

Input:
T1 :  1        T2:   1
    /   \              /  \
   2     3           3    2
  /                  /
 4                 4
Output: No

Give the problem a try before going through the video. All the best!!!

Problem Link: https://practice.geeksforgeeks.org/problems/check-if-tree-is-isomorphic/1
Solution IDE Link: https://ide.geeksforgeeks.org/online-cpp-compiler/0f437f75-54f3-489d-9c12-4963eda0906c

Read More

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK