ALL NODES DISTANCE K IN BINARY TREE | PYTHON | LEETCODE # 863

  Рет қаралды 7,384

Cracking FAANG

Cracking FAANG

Күн бұрын

In this video we are solving an interview question that is popular with Facebook, Amazon, and Microsoft: All Nodes Distance K in Binary Tree (LeetCode # 863).
It's an interesting problem that can be solved in a clever way by transforming the given tree into a graph and then performing a BFS to reach the solution.

Пікірлер: 30
@yuqian822
@yuqian822 9 ай бұрын
My new life saver after NeetCode... Thanks!! very clear explanation.
@crackfaang
@crackfaang 9 ай бұрын
Why not before NeetCode ;)
@yuqian822
@yuqian822 9 ай бұрын
You got this ;)@@crackfaang
@farazahmed7
@farazahmed7 5 ай бұрын
@@crackfaang your content is good but let me give you some constructive feedback ( I mean no harm) Neetcode is more concise and to the point and also explains intuition better. Whereas you drag out sometimes and keep reiterating things that are already explained. This increases duration of video and hence lesser views.
@Tallonest
@Tallonest 16 күн бұрын
@@crackfaangGreg Hogg is also better only than you and neetcode only because he has the shortest videos. I’d say conciseness is the biggest thing to improve on, but regardless your videos have been lifesavers for me
@deepakgoyal1993
@deepakgoyal1993 2 жыл бұрын
Thank you so much for the explanation. I think you have made a mistake at 3:39 minute, actually you can reach node (1) from node (8); so adjacency list of 8 should be 8: [1]. Please correct me if I'm wrong. Thanks!
@crackfaang
@crackfaang 2 жыл бұрын
Yea I may have misspoke there. It’s okay the idea is still the same
@davidmwangi4312
@davidmwangi4312 2 ай бұрын
This channel is a real Gem.....Kudos continue making more FAANG specific videos
@D_T244
@D_T244 2 жыл бұрын
Outstanding quality of the video and explanation. Well done and subbed!
@crackfaang
@crackfaang 2 жыл бұрын
Thanks for the kind words and for subscribing to my channel! It really helps me out
@QVL75
@QVL75 2 жыл бұрын
Excellent description! Very clear to understand.
@crackfaang
@crackfaang 2 жыл бұрын
Thank you, glad you enjoyed the content
@CreativeMining413
@CreativeMining413 Жыл бұрын
Great video, understood everything.
@scuderia6272
@scuderia6272 4 ай бұрын
Top content ser 👌🏻
@appcolab
@appcolab 2 жыл бұрын
I like your explanation. Thanks for sharing,,, I foresee your channel growing very soon!!
@crackfaang
@crackfaang 2 жыл бұрын
Glad you found value in the video! Make sure to subscribe so you don’t miss future videos
@appcolab
@appcolab 2 жыл бұрын
Alright subscribe! Thanks
@ScarlettFan-s5u
@ScarlettFan-s5u 2 жыл бұрын
thank you so much for the great explanation. i just have a one question: when you build the graph, is it a preorder or a BFS traversal?
@NirajKumar-dj3nz
@NirajKumar-dj3nz Жыл бұрын
Hey!! A new Subscriber here😊
@maxli9629
@maxli9629 Жыл бұрын
awesome!
@aadil4236
@aadil4236 2 жыл бұрын
Really good explanation. Do you have a git repo? Where I can find the solutions. It's really hard to see this in video every time, for a reference.
@crackfaang
@crackfaang 2 жыл бұрын
Thanks for the kind words. I don’t currently have one but that’s a good recommendation. I will make one soon (currently on the beach enjoying some time off work 😊)
@aadil4236
@aadil4236 2 жыл бұрын
@@crackfaang on the beah? Wow, that must be fun. Where do you live If you don't mind me asking. My city is not located near the coast so it's really exciting for me to live near a beach.
@yogeshverma9267
@yogeshverma9267 3 ай бұрын
@@crackfaangthank you for the great work❤ I don’t know if you have created a git repo or not, but i can suggest something I use. There’s a chrome extension LeetSync, it uploads your submitted code to github automatically, so you don’t need to do extra work
@saiavinashduddupudi8975
@saiavinashduddupudi8975 2 жыл бұрын
What is the overall Time Complexity?
@morenoh149
@morenoh149 Жыл бұрын
building the graph is O(n), search is O(n) so both reduce to O(n)
@morenoh149
@morenoh149 Жыл бұрын
He says time complexity at 14:00
@appcolab
@appcolab 2 жыл бұрын
Hey can you make the Leetcode "Find all people with a secret"? I was asked by Amazon but I couldn't come up with a nice solution during the interview
@crackfaang
@crackfaang 2 жыл бұрын
I’ll add it to my queue of videos to make! Stay tuned
@appcolab
@appcolab 2 жыл бұрын
Okay, thank you!! I can't wait
WORD BREAK | PYTHON | LEETCODE # 139
18:04
Cracking FAANG
Рет қаралды 3,8 М.
Distribute Coins in Binary Tree - Leetcode 979 - Python
17:41
NeetCodeIO
Рет қаралды 16 М.
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 44 МЛН
OYUNCAK MİKROFON İLE TRAFİK LAMBASINI DEĞİŞTİRDİ 😱
00:17
Melih Taşçı
Рет қаралды 13 МЛН
Man Mocks Wife's Exercise Routine, Faces Embarrassment at Work #shorts
00:32
Fabiosa Best Lifehacks
Рет қаралды 6 МЛН
SHORTEST PATH IN A BINARY MATRIX | LEETCODE 1091 | PYTHON BFS SOLUTION
14:03
I Solved 100 LeetCode Problems
13:11
Green Code
Рет қаралды 67 М.
L24. Right/Left View of Binary Tree | C++ | Java
13:28
take U forward
Рет қаралды 218 М.
10 weird algorithms
9:06
Fireship
Рет қаралды 1,2 МЛН
Making an Algorithm Faster
30:08
NeetCodeIO
Рет қаралды 106 М.
ACCOUNTS MERGE | LEETCODE # 721 | PYTHON SOLUTION
23:04
Cracking FAANG
Рет қаралды 10 М.
PRODUCT OF TWO RUN-LENGTH ENCODED ARRAYS | PYTHON | LEETCODE # 1868
16:24
The LeetCode Fallacy
6:08
NeetCode
Рет қаралды 529 М.
Как остановить электрический счетчик импульсным прибором
0:23
Остановка счетчика на воду, газ, электричество
Рет қаралды 131 М.
How To use Adobe Photoshop cc In photo edit
0:41
Nadeem HD Tech
Рет қаралды 659 М.
Проверил, как вам?
1:01
Коннор
Рет қаралды 5 МЛН