Interesting Encoding

Sir, failing the last test case.

code fails for i/p
1212121212012120

ur o/p
343
correct o/p
165

refer to this code

Done, actually in case where we consider two digits together, was missing corner case(additional condition added to it).

1 Like