Please consume this content on nados.pepcoding.com for a richer experience. It is necessary to solve the questions while watching videos, nados.pepcoding.com enables that.
NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. Description:
Well. We have to print true if the trees given to us are of the same shape else we have to print false.
We are not concerned about the data inside the trees. We are only concerned about their shape.
Question Name:
Are Trees similar in shape
Question Link:
[ Ссылка ]
Question Statement:
1. You are given a partially written GenericTree class.
2. You are required to complete the body of areSimilar function. The function is expected to check if the two trees passed to it are similar in shape or not.
Topic: #Tree #GenericTree #ShapeOfGenericTree #SimilarGenericTrees
Used #DataStructure: #DFS #Recursion
#TimeComplexity: O(N)
#SpaceComplexity: O(N)
--------------------------------------------------------------
Smimilar Questions:
1. Are Trees Mirror In Shape:
a. Pepcoding Portal Link: [ Ссылка ]
---------------------------------------------------------------
More Youtube PlayList:
Level 1 In Java English : [ Ссылка ]
Level 1 In Java Hindi : [ Ссылка ]
Level 2 In Java Hindi : [ Ссылка ]
Constructive Algorithm - Level 3 : [ Ссылка ]
Geometry - Level 3 : [ Ссылка ]
Maths for CP - Level 3 : [ Ссылка ]
DP - Level 3 : [ Ссылка ]
Euler Tour - Level 3 : [ Ссылка ]
Ternary Search : [ Ссылка ]
Recursion & Backtracking - Level 1 : [ Ссылка ]
Recursion & Backtracking - Level 2 : [ Ссылка ]
Graphs - Level 1 : [ Ссылка ]
Dyanmic Programming - Level 1 : [ Ссылка ]
Generic Trees - Level 1 : [ Ссылка ]_
Time and Space - Level 1 : [ Ссылка ]
---------------------------------------------------------------
Pepcoding has taken the initiative to provide counselling and learning resources to all curious, skillful and dedicated Indian coders. This video is part of the series to impart industry-level web development and programming skills in the community.
We also provide professional courses with live classes and placement opportunities.
For more visit our website: [ Ссылка ]
For more free study resources, visit: [ Ссылка ]
Have a look at our result: [ Ссылка ]
Follow us on our Youtube page: [ Ссылка ]
Follow us on our FB page: [ Ссылка ]
Follow us on Instagram: [ Ссылка ]
Follow us on LinkedIn: [ Ссылка ]
Follow us on Pinterest: [ Ссылка ]
Follow us on Twitter: [ Ссылка ]
.
.
.
Happy Programming !!! Pep it up
----------------------------------------------------------------
#Tree #GenericTree #SpanningTree #SimilarShapedTrees #MirrorOfATree
![](https://i.ytimg.com/vi/ZJ-18ynmHZw/maxresdefault.jpg)