It is working correctly in Dev Cpp. However in Coding blocks IDE its showing 0 for any input.
Though while submitting as well 1 test case is satisfied.
It is working correctly in Dev Cpp. However in Coding blocks IDE its showing 0 for any input.
Though while submitting as well 1 test case is satisfied.
https://ide.codingblocks.com/s/312647 Yesterday I got a rely that my code will give incorrect ouput for 1 ababababb and correct output should be 4. But according to me the ques the correct output should be the maximum number of equal strings. Considering which it will give the ouput as 6 and not 4. Please eleborate why output shoulb 4 and not 6.
@mverma_be19
my bad.refer to the test case
2
aabbaababba
correct output will be 6 u are getting 8
if you were to replace 3rd and 4th b with a the string would become aaaaaababba, which would make the longest substring of only a or b to be of size 6.