activity selection problem

activity selection problem: select the maximum sum of mutually disjoint
intervals