Segment Tree Series - https://bit.ly/segment-trees
Other In-Out DP problems -
1. • In Out DFS | Difference Between Maximum an...
2. • Collect Coins in a Tree | In Out DP Explai...
Codeforces Blog mentioned in video - https://codeforces.com/blog/entry/101271
*************************************************
Contest Link - https://leetcode.com/contest/weekly-c...
Problem Link - https://leetcode.com/contest/weekly-c...
Solution - https://leetcode.com/problems/find-mi...
*************************************************
Timestamps -
00:00 - Agenda
00:42 - Problem Description
01:20 - Finding Diameter of Tree
02:35 - Brute force solution
04:40 - What should we try to optimise?
05:55 - Figuring out best "Y" without iterating over all the "Y"
14:20 - Figuring out best "X" without iterating over all the "X"
16:20 - [Farthest node] Brute force solution
19:25 - [Farthest node] What's missing after the 1st DFS
23:41 - [Farthest node] Computing farthest node going out
33:07 - [Farthest node] Pseudo code & Time Complexity - "Out computation"
37:51 - Recap of full solution
41:11 - Code Walkthrough
*************************************************
Interview Experiences Playlists -
Microsoft - • Microsoft Interview Questions
Amazon - • Amazon Interview Questions
D.E.Shaw - • D.E.Shaw Interview Questions
Linkedin - • Linkedin Interview Questions
Facebook - • Facebook (Meta) Interview Questions
*********************************************************************
Please show support and subscribe if you find the content useful.