Pls check it is failing test 2,4
sorry test 0 and 2 it is failing
at line no 10
j<β\0β, (i < β\0β) what does these means
it should be s[i]!=β\0β
check out modified code
i have done changes and now it is passing all the testcase
if you have further doubts feel free to ask
Modified Code
ok thankyou so much but the string size was btwn 1to 1000 why did you make that to 10000???
you can make it 1000
i was just check whether i may overflow or not
it wasnt working with 1000
it means internally size of array is more than 1000
so make it 10000
ok also if i declare c outside while loop will it not pass test case???
this is because c is the count of occurence of str[i]
so to count, counting should start from 0 or 1
letβs consider this example aabbaacaa
first you count occurence of a hence c will be 6
now to count occurence of b you have to set c=0 again , otherwise counting starts 6 onward