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 code and Continue to submit your code and move to the next Question.
Steps to modify your code submissions
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.
To modify your code submissions in the Test:
- Click the icon to view the list of all Test Questions.
- Click the Modify Submission link next to the coding Question.
- After modifying your code, click Run Code to compile the modified code.
- Click the Submit code and Continue 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.|
Refer the following topics for more information: