MotaSanyal's blog

By MotaSanyal, history, 5 years ago, In English

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.

  • Vote: I like it
  • -2
  • Vote: I do not like it

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Greedy: At any instant, choose the pen which can write current character and takes you furthest ahead in the string S without switching pen.