Problem Link : PMARK
Can anyone please help me with an approach to this problem . I was thinking about it for about 2 days but I couldn't come up with a solution . And is there a general approach to these type of problems .
UDP: Thank you guys for clarifying my doubts.