Help me to fix the run time error (SIGSEGV) in my code

Please either format your code or link to your submission - the forum software has mangled it and it won’t compile! :slight_smile:

Edit:

If you’re talking about this, then it’s a WA, not a RE. Consider the testcase:

2
4 1 3 2 4 3 2 4
1 2 3 4
4 1 3 2 4 3 2 4
1 2 3 4

You’d probably get RE if you tried to Run without providing Custom Input, though :slight_smile:

3 Likes