All Collections
During the Test
Test cases say 'Wrong Answer'. What should I do now?
Test cases say 'Wrong Answer'. What should I do now?
Priyanka Khandagale avatar
Written by Priyanka Khandagale
Updated over a week ago


Candidates must know what to do when the compiler says 'Wrong Answer'.

If while taking a coding test

The test cases say 'Wrong Answer' after you have run your code, any of the following could be a possible reason:

  1. You have incorrectly interpreted the question and the logic used in your code is incorrect.

  2. You have not correctly debugged your code and your code still contains bugs.

  3. You have missed some corner cases of the problem statement, hence, all the test cases are not passed.

  4. You have used incorrect syntax.

  5. You have not used the brackets correctly.

  6. The indentation is incorrect.

  7. You have added unwanted print statements inside the code, which is altering the output.

  8. Your code has passed all the Sample test cases. However, it could not pass all the hidden test cases successfully.


Note: You can toggle the custom input button below the code editor to enter a custom input, based on the input requirements of the question, to debug your code.

Did this answer your question?