Leetcode question......help

code works perfect for all test cases in sublime text but fails when run on leetcode server ?

any mistakes ?

Hello @hg11110000 how do you know that you code is working fine for all test cases?

@tusharaggarwal272
because i tested on the case on which it was failing on leetcode server

but it shows correct output when i run on sublime

@hg11110000 wait let me check then:

@tusharaggarwal272
??

@hg11110000 check your code for this test case:
[1,2,3]
[[2],[1,3]]
your output is true but the correct answer is false.
you are not allowed to reorder the integers in each array pieces[i].
check this code:https://ide.codingblocks.com/s/398227
i have just submitted it.

if you want me to explain this code:
you can ask here;
Happy Learning!!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.