Hello Everyone! I am stuck at this problem. I would highly appreciate if somebody explains me how the approach to this problem.
P.S. : This problem doesn't have an editorial yet.
Hello Everyone! I am stuck at this problem. I would highly appreciate if somebody explains me how the approach to this problem.
P.S. : This problem doesn't have an editorial yet.
Greedy: At any instant, choose the pen which can write current character and takes you furthest ahead in the string S without switching pen.