COMPILER-Getting WA

Can Somebody give test case for which my solution is wrong
Soln-http://www.codechef.com/viewsolution/3972414

Your code fails for this case :

<><><>

correct answer : 6

Your answer : 2

I suggest you to understand this carefully :

“you should tell the length of the longest prefix of each of these expressions that is valid, or 0 if there’s no such a prefix.”

1 Like
//