i am unable to do questions of segment trees on codechef like
https://www.codechef.com/problems/CHANOQ
https://www.codechef.com/problems/PARRTY
please guide me , how can i approach such type of problems? Are there any prerequisites for such type of problems ?