PRFYIT - Editorial

I did it using DP by maintaining the minimum deletions needed to convert the given string to strings of type 0, type 1, type 01, type 10, type 010 and type 101.
My Solution

5 Likes