Invert Binary Tree (LeetCode 226) | Full solution with diagrams and animations | Study Algorithms

  Рет қаралды 9,285

Nikhil Lohia

Nikhil Lohia

Күн бұрын

Пікірлер: 21
@fortunefunda4171
@fortunefunda4171 5 ай бұрын
Sir at 13:42 you added 2 and 7 to the Queue but shouldn't 7 and 2 be added to Queue because you did swapping before this . I really liked your explanation but having this little doubt. Please clear this minor doubt.
@garvitarora7777
@garvitarora7777 5 ай бұрын
yes you are right
@nikoo28
@nikoo28 5 ай бұрын
Yep…sorry for the confusion
@ashok2089
@ashok2089 2 ай бұрын
Others: Let's explain recursive approach, done. Nikhil: also explains BFS approach! That's why you are a gem!
@kanaramjangid8563
@kanaramjangid8563 2 ай бұрын
Every videos has 110% of good explanation.
@nikoo28
@nikoo28 2 ай бұрын
Glad you like them!
@evadranuvvuu
@evadranuvvuu 2 ай бұрын
if(root == null) { return null; } TreeNode temp=root.left; root.left=root.right; root.right=temp; invertTree(root.left); invertTree(root.right); return root; Sir this one take o(1)space? Then why using queue sir? Please any one explain?
@anushkamathur4050
@anushkamathur4050 Ай бұрын
Why are there so less likes on this video, this is so informative. I have seen more likes on stupid content and this quality content is getting lesser likes. Great work Nikhil Bhiaya!
@minnikeswarrao6185
@minnikeswarrao6185 Жыл бұрын
Hi sir, First of all big fan of your work🙌 Requesting you to solve "Sum of distances in tree" problem of leetcode... I have gone through many videos but none of them are clear... Looking forward for your explanation 😇
@anirudhv0062
@anirudhv0062 5 ай бұрын
why is the Linked List implementation of the queue being used here? can we use other thing like deque or other implementation of queue also?
@nikoo28
@nikoo28 5 ай бұрын
Yes
@anirudhv0062
@anirudhv0062 5 ай бұрын
@@nikoo28 Thanks! Your explanations are awesome
@TamilarasiM-gs8fb
@TamilarasiM-gs8fb Жыл бұрын
Thank you so much .After a long search I got clearly explained video
@quanganh7094
@quanganh7094 10 ай бұрын
thanks, very comprehensible!!
@susmitapatil4847
@susmitapatil4847 4 ай бұрын
Very well explained. Thank you so much for such nice content 🎉
@nikoo28
@nikoo28 4 ай бұрын
My pleasure 😊
@glaide1500
@glaide1500 Ай бұрын
Man : On all your series, you tried !!! ... Thank you so much as you continue to saves life.
@subee128
@subee128 9 ай бұрын
Thanks
@ascreations1396
@ascreations1396 9 ай бұрын
😃😃😃😃😃😃😃😃😃
@lemui2075
@lemui2075 Жыл бұрын
Thank you so much for video with explaination. May I check with you, why you put the keyword "final" in front of Queue ?
@nikoo28
@nikoo28 Жыл бұрын
you can remove the "final" keyword if you like. It is not necessary in this implementation. :)
FINDING THE NON-REPEATING ELEMENT IN THE GIVEN ARRAY || Shyam Sundar
4:29
Programming By Shyam Sundar
Рет қаралды 9 М.
The selfish The Joker was taught a lesson by Officer Rabbit. #funny #supersiblings
00:12
Which One Is The Best - From Small To Giant #katebrush #shorts
00:17
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 23 МЛН
Leetcode 46. Permutations : Introduction to backtracking
10:06
ComputerBread
Рет қаралды 97 М.
The selfish The Joker was taught a lesson by Officer Rabbit. #funny #supersiblings
00:12