WA in COMPILER despite many correct cases

I can’t find what is wrong, can’t make more test cases, and all seems to be just fine according to my understanding of the problem, but i get WA

Here is my code
https://www.codechef.com/viewsolution/31506659

if you can help out with test cases to make it fail, i would be glad, I can share my test cases, or comment the code more, let me know.

Thank you in advance :slight_smile:

Your solution fails on the following testcase:

1
<>><>
2 Likes

my GOD that was fast! hahaha :laughing:

Thank you very much :slight_smile:

1 Like

AC with even better time :smiley:

Question, how do you go about making test cases in problems like that, where the inputs are not just numbers you can make methodically easily (or easy enough :laughing:), but patterns like that?

Is there a methodical way to generate test cases for stuff like that?

Thanks again :slight_smile:

For this one, you can just generate a string where each character is randomly chosen to be either < or >.

2 Likes