2385. Amount of Time for Binary Tree to Be Infected | Graph | Tree | BFS | DFS | Microsoft
Vložit
- čas přidán 8. 01. 2024
- In this video, I'll talk about how to solve Leetcode 2385. Amount of Time for Binary Tree to Be Infected
Problem Link: leetcode.com/problems/amount-...
Checkout DSA-169 Series: • Aryan DSA-169 Series |...
100Days 100k Placements: • 100 Days 100K Placement
Let's Connect:
📝Linkedin: / aryan-mittal-0077
📸 Instagram: / ez.pz.dsa
📱Telegram : t.me/aryan_mittal_group
🤖 Github: github.com/aryan-0077
About Me:
I am Aryan Mittal - A Software Engineer in Goldman Sachs, Speaker, Creator & Educator. During my free time, I create programming education content on this channel & also how to use that to grow :)
✨ Timelines✨
0:00 - Problem Explanation
2:52 - Convert to Graph - Do a BFS
13:24 - Tree - DFS - One Pass
✨ Hashtags ✨
#programming #Interviews #leetcode #faang #maang #datastructures #algorithms
I know, its a long video, but wanted to discuss One Pass approach too, as no-one on youtube discussed it ❤!!
My first intuition is using DFS approach but I stuck in calculating the max distance from start node to the farthest node...
Your explanation is so clear that I finally understand whats going on of "min(left, right) - 1"
appreciate 👍
you blew my brains up, and I'm not even exaggerating!
I think it's similar to burn tree with a starting node 😊
Was waiting for this masterpiece 👏
thanks
@@harshal8781 ??
Underrated, thanks
I don't exactly remember, but there is a similar problem like this.
rotten oranges is the same thing
@@himanshuadhikari9440 Yepp
Bhai , please also solve geeksforgeeks POTD☺
Propogation Algo : BFS/DFS