Topological Sort + Strongly Connected Components
Topological Sort:
Resource:
https://www.geeksforgeeks.org/topological-sorting/
https://www.youtube.com/watch?v=Q9PIxaNGnig&t=262s
Practice:
Strongly Connected Components:
https://www.spoj.com/problems/CAPCITY/
https://www.spoj.com/problems/TFRIENDS/
https://codeforces.com/contest/427/problem/C