Special String Again

  • + 0 comments

    I do not understand why in the 3rd pass is ans+=min(l[i - 1][1], l[i + 1][1]) and not the summatory of min f.e in aaabaaa the possible ones aren't aba aabaa aaabaaa ??? whith your code is only aaabaaa