your name is mine

http://www.codechef.com/viewsolution/2184891
The solution submitted here is incorrect, as i think. I tried using the names as “joe john”, the answer must have been NO but YES is being displayed.

this is the corrected code…[LINK][1]!!!

the error was this…

if (countT == b.length()-1)

should be…

if (countT == b.length())

hope you understand the mistake…:slight_smile:
[1]: http://www.codechef.com/viewsolution/2411139

@kunal361 >> yeah i got that. the guy that submitted it must be lucky. computer wasn’t able to detect this error in his code and marked it as solved.