Symmetric Tree - Leetcode 101 - Trees (Python)

  Рет қаралды 2,576

Greg Hogg

Greg Hogg

Күн бұрын

Пікірлер
@GregHogg
@GregHogg 4 ай бұрын
Master Data Structures & Algorithms For FREE at AlgoMap.io!
@servantofthelord8147
@servantofthelord8147 4 ай бұрын
Wow. Such a beautiful solution. Excellent work as always Greg!
@GregHogg
@GregHogg 4 ай бұрын
Thank you!
@SivaTechVerse
@SivaTechVerse 20 күн бұрын
Greg is great as usual!
@DTsertsvadze
@DTsertsvadze 5 ай бұрын
Hey Greg you rock dude! Big fan of your approach.. btw what app are you using for drawing?
@GregHogg
@GregHogg 4 ай бұрын
Sorry for the slow reply! I use miro :)
@SivaTechVerse
@SivaTechVerse 20 күн бұрын
love your videos
@anmolacharya309
@anmolacharya309 3 ай бұрын
Great Animation
@raymondchan3925
@raymondchan3925 3 ай бұрын
Question: Thanks for the instruction!! love it but one question though. If you call same(root, root) at he beginning, wouldn't you ends up with two identical call stacks and ends up with Time: O(2n) ? Why not do same(root.left, root.right) from the start? I understand you will have to do something to check the initial root and the first two children but the trade off is you have 50% improvement in time, right?
@viswanathvuppala4526
@viswanathvuppala4526 5 ай бұрын
How about doing a level order traversal and check if every level is a Palindrome.
@GregHogg
@GregHogg 4 ай бұрын
That's a cool solution
@viswanathvuppala4526
@viswanathvuppala4526 4 ай бұрын
@@GregHogg Hey, thanks!
@etaidiary
@etaidiary 3 ай бұрын
@@viswanathvuppala4526 tried that, they have a case that blocks that
@KRISHNASINGH-i2v
@KRISHNASINGH-i2v 5 ай бұрын
Hey greg big fan From india Can you please put more binary tree questions already completed what you have posted on binary tree
@ghost_7701
@ghost_7701 5 ай бұрын
Dude Python is a pseudo code!😮
@GregHogg
@GregHogg 4 ай бұрын
Haha pretty much yeah
Subtree of Another Tree - Leetcode 572 - Trees (Python)
6:01
Greg Hogg
Рет қаралды 3,5 М.
Symmetric Tree - Leetcode 101 - Python
6:40
NeetCodeIO
Рет қаралды 39 М.
When Cucumbers Meet PVC Pipe The Results Are Wild! 🤭
00:44
Crafty Buddy
Рет қаралды 60 МЛН
Players push long pins through a cardboard box attempting to pop the balloon!
00:31
Long Nails 💅🏻 #shorts
00:50
Mr DegrEE
Рет қаралды 16 МЛН
Implement Trie (Prefix Tree) - Leetcode 208
18:56
NeetCode
Рет қаралды 213 М.
The Truth About Learning Python in 2024
9:38
Internet Made Coder
Рет қаралды 216 М.
Diameter of Binary Tree - Leetcode 543 - Trees (Python)
11:16
How I Mastered Data Structures and Algorithms in 8 Weeks
15:46
Aman Manazir
Рет қаралды 102 М.
L25. Check for Symmetrical Binary Trees | C++ | Java
9:20
take U forward
Рет қаралды 163 М.
How to solve (almost) any binary tree coding problem
4:20
Inside code
Рет қаралды 188 М.
When Cucumbers Meet PVC Pipe The Results Are Wild! 🤭
00:44
Crafty Buddy
Рет қаралды 60 МЛН