0 like 0 dislike
2,674 views
in Competitive-Programming by Expert (44,050 points) | 2,674 views

1 Answer

0 like 0 dislike

To get good at trees : 

1)Master BFS and DFS . Understand them completely and solve plenty of good quality problems on the same! 

2)Understand LCA concept and its applications . 

3)Learn about Euler Tour . (Apply them on subtree problems)

4)Do Dp on trees . 

5)Do HLD and Centroid Decomposition . 

For mastering BFS and DFS , solve problems from here : https://www.hackerearth.com/practice/algorithms/graphs/breadth-first-search/tutorial/ 

For , LCA : https://cp-algorithms.com/graph/lca_binary_lifting.html 

Euler Tour : https://codeforces.com/blog/entry/18369 

Dp On Trees : https://www.commonlounge.com/discussion/8573ee40c4cb4673824c867715a5bc7b 

Problems on trees (including all topics) : 

1)https://codeforces.com/problemset?tags=trees,1500-1600 

2)

https://www.hackerearth.com/challenges/competitive/data-structures-and-algorithms-coding-contest-feb-21/algorithm/special-path-b3ac37d0/ 

3)

https://leetcode.com/problems/tree-of-coprimes

4)https://codeforces.com/blog/entry/81527

5)https://codeforces.com/contest/1388/problem/D

6)https://www.hackerearth.com/practice/algorithms/graphs/breadth-first-search/practice-problems/algorithm/emergency-meeting-da1fc0b5/editorial/

7)https://www.geeksforgeeks.org/find-maximum-path-sum-in-a-binary-tree/ (Also solve it for a normal tree) 

8)https://codeforces.com/blog/entry/20935

9)https://www.codechef.com/INQU2019/problems/INQU1904

10)https://codingcompetitions.withgoogle.com/kickstart/round/0000000000050edc/000000000018666b

11)https://www.codechef.com/problems/MINIKILL

12)https://www.codechef.com/problems/STRPTRE

13)https://atcoder.jp/contests/abc160/tasks/abc160_f

14)https://codeforces.com/contest/1399/problem/E2

15)https://www.codechef.com/problems/PATHETIC

16)https://codeforces.com/problemset/problem/1324/F

17)https://www.codechef.com/problems/CENS20F

18)https://www.codechef.com/COOK98A/problems/UPDOTR

19)https://www.codechef.com/APRIL19B/problems/SUBREM

20)https://www.codechef.com/COOK100A/problems/TREEUNAT

21)https://codeforces.com/problemset/problem/1213/G

22)https://www.codechef.com/COZI2019/problems/DAGXOR

23)https://www.codechef.com/LTIME77A/problems/DDQUERY 

 

by Expert (44,050 points)