In HackerRank Tests, your answer to coding questions is periodically auto-saved by the code editor. Click Run Code to compile your code and execute the test cases. Click Submit to submit your code and move to the next question.
Steps to Modify your Code Submission
During the test, you can revisit your submitted code to make any changes and resubmit your solution any number of times before the test ends.
Modify your code submissions in the Test:
- Click on All to view the list of all test questions.
- Click the Modify link next to the coding question.
- After modifying your code, click Run Code to compile the modified code.
- Click the Submit button to submit the modified code.
Note: For Coding questions, when you make changes in your already submitted code, you must click Run Code to re-compile and re-execute the test cases and then click Submit code & continue to submit the changed answer. If you do not re-compile the code after making changes, the last compiled version will be automatically submitted in your test, and the modified answer will not be considered.
In a scenario where the test times out while you are still answering a coding question, the last saved version, or the last compiled version of your code is automatically submitted. The following table describes how your code is auto-submitted in different scenarios when the test ends:
|You typed the code, but never submitted or compiled it, i.e., never clicked Run Code or Submit code & Continue.||HackerRank will submit the last saved version of the typed code when the test times out.|
|You typed the code and clicked on the Submit code & Continue button to submit. You revisited the question and updated/tweaked the code but never re-submitted or compiled it again.||HackerRank will submit the previously submitted code (not the tweaked code) if the test times out and gets closed automatically.|
|You typed the code and clicked on the Run Code button. However, you didn’t click on the Submit code & Continue button.||HackerRank will submit the latest compiled version.|
Article is closed for comments.