My code passed all test-cases when I clicked on "Verify" but got rejected when I clicked on "Submit"
My code passed all test-cases when I clicked on "Verify" but got rejected when I clicked on "Submit"
This might be because your code has cleared the sample test cases when you clicked on "Verify" but failed to clear the hidden test cases [non-sample test cases] when you clicked on "Submit". Please read below for a detailed explanation of the same:
There are two types of Test-cases, sample & non-sample
1) Sample Test Case
Executed at the time of “Verify” and “Submit.”
You will be able to see the Input and Expected output at all times
The primary purpose is to check how your code is performing against some test cases so that you make corrective changes and then submit the code.
2) Non-Sample Test Case [Hidden Test-cases]
Executed only at the time of “Submit.”
You will be able to see the Input and Expected output only once you have exhausted all the Submissions or have got the question completely correct.
The primary purpose is to check the correctness of the solution code.
By clicking on 'details' you can find this info:
Before exhausting all attempts: type of error for non-sample test cases
After exhausting all attempts: type of error + non-sample test cases checked.
If you continue to face this issue, do raise a ticket by clicking on the "Report an Error" button at the bottom of your learning segment page.