Pre-Computation using DFS | Subtree Queries | CP Course | EP 74

Опубликовано: 11 Март 2026
на канале: Luv
43,665
1.2k

Graph/Trees Playlist :    • Graph & Trees Course  
FREE COMPETITIVE PROGRAMMING COURSE PLAYLIST :    • Competitive Programming/DSA Course | Hindi  

In this video i explain how to precompute using dfs and how to solve subtree related questions

Practice Questions:
https://leetcode.com/problems/longest...
https://leetcode.com/problems/pacific...
https://leetcode.com/problems/island-...
https://leetcode.com/problems/flood-f...
List of Very Good dfs practice Questions(scroll to end) : https://cp-algorithms.com/graph/depth...


Timestamps:
Explanation: (0:00)
Code: (7:06)

Be a part of our awesome Community. Join
○ Discord :   / discord  
○ Telegram : https://t.me/LuvIsMeYT

You can follow me on below platforms for all the latest updates
○ Instagram :   / i._m_.luv  
○ Twitter :   / luvk1412  
○ Linkedin :   / luvk1412  

Blog(Not frequently updated)
○ Blog : https://www.codewithluv.in


Hashtags
#dfs #subtree #queries #graph