Before Test Starts
1.1 What browser should I use for the best experience?
For the best experience you should use the latest stable versions of Google Chrome and Mozilla Firefox. HackerRank works well on Mozilla Firefox version 35 and above, and Google Chrome version 40 and above.
1.2 What is sample test?
If you are new to HackerRank, it is highly recommended that you try our sample test. Getting familiar with the platform will help you use your time effectively during the actual test. Actual test can be taken only once.
1.3 Can I take the Sample Test more than once?
Yes. You can attempt the sample test as many times as you want.
1.4 I'm forced to take the test in full screen mode. How can I escape from this?
This is a full screen test. You can't take this test without the full screen. However, if you wish to navigate to another window/browser tab during the test, you can do so by pressing "Esc" or Alt+Tab. HackerRank will capture the number of times this was done and the duration you were out of the full screen. This will be visible to the company you apply to.
During The Test
1.5 What are test cases?
HackerRank runs your code against a certain number of testcases every time you submit code. A test case consists of input data that is fed into your program, and the output expected from your program for that particular input. So, a test case is successful when your program produces expected output for that particular input. It is a failure when your program doesn’t produce the expected output (either wrong output or it took too long and was killed). A 'large' test case means a test case with a large input.
1.6 After I have submitted answer to a question, can I come back and change my submission?
Yes. You can navigate freely across the questions, and re-submit your solution to any question by clicking on "Submit & Continue" multiple times. There is no limit on the number of times you can submit your answer to a question.
1.7 How can I debug my program?
- You can debug your program by printing debug statements to STDOUT. All your print statements will be captured separately in an area called 'Debug Output', and they will be ignored while comparing your output with expected output. Just ensure that you return the expected output.
- Some problems also allow you to check a checkbox - 'Test against custom input' - just below the code editor: you can use this option to specify your own STDIN input values to run your test against. When you select this checkbox, no other test cases will be executed.
1.8 What is “Time Limit Exceeded” or “Terminated due to timeout” error?
We look for optimal algorithms in your solutions. Every problem has been set a time limit with respect to its optimal solution. If your code could not produce the required output within the set time limit, you get a 'Time Limit Exceeded' error. Test cases get progressively larger, so it is common for a naive solution to pass the first few (smaller) test cases and then fail when confronted with the bigger ones.
1.9 What is a “Wrong Answer”?
Your logic is wrong. If a few test cases have passed, that probably means some of the later test cases have edge cases that your code is not handling. Think about every possible edge case within the problem specifications (you will never be given invalid input), and handle them.
Post The Test
1.10 Will I get to know my score in the test?
Your scores will not be disclosed to you. However your scores shall be made available to the companies you apply to. If you have further questions, please contact LinkedIn Support.