CONVERT BINARY SEARCH TREE TO SORTED DOUBLY LINKED LIST | LEETCODE # 426 | PYTHON SOLUTION

  Рет қаралды 12,452

Cracking FAANG

Cracking FAANG

2 жыл бұрын

In this video we are solving a popular Facebook interview question: Convert BST to Sorted Doubly Linked List (leetcode # 426).
At first glance this problem is really easy as you can simply do an inorder traversal to parse out all the elements and then link them using a for loop but the problem challenges us to do it in-place which means we have to do the linking as we perform the inorder traversal, adding a bit of a twist to the question. Stay tuned to find out how to solve this interesting question!
If you enjoyed the video and got some value from it, then consider dropping a subscription to my channel and helping me reach my goal of 1000 subscribers!

Пікірлер: 16
@GorakhBorude-codeguru
@GorakhBorude-codeguru 2 ай бұрын
when I saw LeetCode question , I got scared but after watching your video , it becomes very simple to understand ..! you got new subscriber ..!
@sidazhong2019
@sidazhong2019 12 күн бұрын
This is more like a stack way instead of dfs() tree traversal. Or let's say you combined them together. brilliant, I have a new understanding of trees now.
@luvverma6867
@luvverma6867 2 жыл бұрын
Amazing Videos!! Thankful to you !!
@crackfaang
@crackfaang 2 жыл бұрын
Thank you! Comments like this keep me going
@cmdv42
@cmdv42 Жыл бұрын
🙌💯✨
@annlaosun6260
@annlaosun6260 Ай бұрын
omg, thank you thank you thnak you!
@subee128
@subee128 6 ай бұрын
Thanks
@AmolGautam
@AmolGautam 8 ай бұрын
thanks
@michaelhernandez5478
@michaelhernandez5478 2 жыл бұрын
Thank you! How you set up the recursion upon reaching the earliest inorder leaf node makes sense. Would it be possible for you to do a handful of backtracking/brute force combinations/permutations problems? I'm going through 465 Optimal Account Balancing and 679 24 Game specifically, and can't figure out how to structure the recursion properly against the expected result.
@crackfaang
@crackfaang 2 жыл бұрын
First of all thank you for your support. I’ll add those problems to my work queue and make videos in the near future. Make sure you subscribe so you don’t miss them when they come out 😁
@amandwivedi1980
@amandwivedi1980 2 жыл бұрын
Try adding code links for clearness.
@rsKayiira
@rsKayiira Жыл бұрын
Great video could you please do LC 636 Exclusive Time of Functions
@crackfaang
@crackfaang Жыл бұрын
Sure, I’ll do so when I return home from my vacation
@rushikeshbutley7576
@rushikeshbutley7576 7 ай бұрын
I always get the intuition but I very much struggle while coming up with code or putting it in such way that i can write code based on dry run or solution i came up with. I always feel like giving up in middle of doing dry code as I feel I will not be able to solve it. Not sure how am gonna do this in interview 😑
@alexistm
@alexistm Ай бұрын
Can this be done without recursion?
@crackfaang
@crackfaang Ай бұрын
Yes, most recursion problem can be solved with an iterative solution and vice versa. Probably some exceptions exist but in general the rule holds true
INSERT INTO CIRCULAR LINKED LIST | LEETCODE # 708 | PYTHON SOLUTION
15:25
LOWEST COMMON ANCESTOR OF A BINARY TREE I | PYTHON | LEETCODE 236
12:48
ОБЯЗАТЕЛЬНО СОВЕРШАЙТЕ ДОБРО!❤❤❤
00:45
I'm Excited To see If Kelly Can Meet This Challenge!
00:16
Mini Katana
Рет қаралды 30 МЛН
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 11 МЛН
Каха заблудился в горах
00:57
К-Media
Рет қаралды 10 МЛН
8 patterns to solve 80% Leetcode problems
7:30
Sahil & Sarra
Рет қаралды 290 М.
EXCLUSIVE TIME OF FUNCTIONS | LEETCODE 636 | PYTHON SOLUTION
15:42
Cracking FAANG
Рет қаралды 4 М.
BST - 21: Convert BST to Sorted Doubly Linked List (DLL)
14:20
Coding Simplified
Рет қаралды 8 М.
LOWEST COMMON ANCESTOR OF A BINARY TREE II | PYTHON | LEETCODE 1644
20:46
SHA: Secure Hashing Algorithm - Computerphile
10:21
Computerphile
Рет қаралды 1,2 МЛН
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 633 М.
Copy List with Random Pointer - Linked List - Leetcode 138
10:07
Запрещенный Гаджет для Авто с aliexpress 2
0:50
Тимур Сидельников
Рет қаралды 1,1 МЛН
Это iPhone 16
0:52
Wylsacom
Рет қаралды 921 М.
Какой ноутбук взять для учёбы? #msi #rtx4090 #laptop #юмор #игровой #apple #shorts
0:18
Частая ошибка геймеров? 😐 Dareu A710X
1:00
Вэйми
Рет қаралды 5 МЛН
#samsung #retrophone #nostalgia #x100
0:14
mobijunk
Рет қаралды 14 МЛН
Better Than Smart Phones☠️🤯 | #trollface
0:11
Not Sanu Moments
Рет қаралды 19 МЛН