Home › Blog › HackerRank Assessment Guide

HackerRank Assessment: How It Works and How to Prepare

What candidates actually see in a HackerRank coding test, how sample and hidden test cases are scored, which proctoring settings employers can switch on, and how to practice for it.

A HackerRank assessment is a timed online test an employer sends you through HackerRank, usually built around coding questions that run your code against sample and hidden test cases, sometimes mixed with multiple-choice, SQL or project questions. Each coding question is scored by adding up the points for the test cases your code passes, so partial credit is real, while the employer controls the time limit, the question mix and integrity settings such as tab tracking, full-screen mode and webcam monitoring. The best preparation is timed practice in HackerRank's own input and output format, and the test itself must be done on your own, under the employer's rules.

Everything below is based on HackerRank's candidate help center and its employer documentation, so you know what to expect before the clock starts.

What you see when you open the test

Your invitation email links to a login page. Before any timer starts, it shows:

Once you click Start Test, plan as if the clock will not stop for anything. HackerRank's candidate help tells you to have uninterrupted internet and power, so sort out your setup before you begin.

Question types you might get

TypeWhat you doHow it is scored
CodingComplete a function or write a full programAutomatically, by test cases passed
DatabaseWrite SQL queriesFull credit if the returned data matches, otherwise zero
Multiple choicePick one or more answers5 points by default; employers can turn on negative marking
SubjectiveWrite a free-text answerManually, by a reviewer

HackerRank also supports project, front-end, back-end, DevOps and diagram questions. The mix depends on the role and the employer, and the Test format section is the only reliable guide to yours.

The coding environment

LanguageTime limitMemory limit
C++ (C++11 to C++23)2 seconds512 MB
C#3 seconds512 MB
Java 17 and Java 214 seconds2,048 MB
Go4 seconds2,048 MB
Python 310 seconds512 MB

These figures are from HackerRank's Execution Environment page as of October 2026 and can change; check that page, or the info icon next to the language dropdown in your test, for the current environment details. Python's longer allowance does not rescue a slow algorithm: an O(n²) loop over 100,000 items is about ten billion steps in any language.

HackerRank's candidate help lists Chrome, Firefox and Edge as fully supported and states that Brave is not supported. The optional Sample Test on the login page runs in the same environment, so it is the easiest way to try your browser and setup in advance.

Sample tests, hidden tests and custom input

Coding questions are graded by test cases: inputs fed to your code, with your output compared to an expected output. A test case passes only on an exact match.

What you seeScored?
Sample test casesThe input, your output and the expected outputSometimes; employers can give them zero points
Hidden test casesPass or fail, plus your own output and debug output unless the employer turned that off; never the input or expected outputYes, each with its own points
Custom inputYour own inputs and your program's outputNo; it is only for debugging

Hidden tests are where the corner cases live, and HackerRank tells employers to use test cases of different sizes and complexity, so expect edge cases and large inputs that punish a slow algorithm. Its guidance is 8 to 15 test cases per coding question, ideally 10, with only 2 or 3 of them as samples, so most of what you are graded on is hidden. A green sample run is a starting point, not a finish line.

Run executes your code against the test cases or your custom input; Submit records your answer, and you can edit and resubmit as many times as you like before the test ends. After editing a submitted answer, run it again and resubmit, or the earlier submission is what counts. The two failure statuses you will see most:

StatusWhat it meansWhat to check
Wrong AnswerYour output did not exactly matchExtra spaces or newlines, leftover debug prints, input read in the wrong format, missed edge cases
Terminated due to timeoutA test case did not finish within the time limitAlgorithm complexity, nested loops over large inputs, infinite loops, slow input reading

In function-stub questions, print statements go to a separate Debug Output panel and do not affect your score, but in questions that check printed output, leftover debug lines fail the test. For large inputs, HackerRank recommends sys.stdin.readline() over input() in Python and BufferedReader over Scanner in Java.

How scoring and partial credit work

Your score on a coding question is the sum of the scores of the test cases you pass: full score when all pass, partial score when some do, nothing when none do.

Partial credit changes the strategy. A brute-force solution that passes the small hidden tests earns points. A clever solution you never finished earns nothing. Get something correct submitted first, then optimize and resubmit.

What happens when the timer runs out

The test ends automatically, and what gets evaluated depends on your last action on each coding question. Based on HackerRank's help articles:

Your last actionWhat gets evaluated
Submitted, with no edits sinceYour latest submission
Ran the code but never submittedYour most recent run
Submitted, then edited without re-runningThe earlier submission, not your edits
Typed code but never ran or submitted itUnclear: HackerRank's help articles disagree on whether it counts
Multiple choice and subjective answersYour answers, which are auto-saved

The safe habit: run and submit every time you reach a working version, and stop writing new code a few minutes before the end to do a final run and submit on every question.

Proctoring settings employers can turn on

Some tracking is on by default in every HackerRank test; the rest is the employer's choice. According to HackerRank's documentation:

SettingDefault?What it does
Copy and paste trackingOnRecords copy and paste actions automatically for the employer to review
Tab proctoringOnRecords how often, and for how long, you left the test window
Plagiarism detectionAutomated; an AI version is optionalFlags code matching other candidates or online sources, even with renamed variables
Secure ModeEmployer settingFull screen, copy and paste blocked, single monitor, alerts on tab switches
Image proctoring and photo IDEmployer settingWebcam snapshots during the test and a photo before it starts
Proctor ModeEmployer setting (AI add-on)Webcam, screen sharing, single-monitor checks and periodic screenshots, with flags for tab switches, exiting full screen and phones in view
Desktop App modeEmployer setting (AI add-on)The test runs in the HackerRank Desktop App (Windows 10 or 11, macOS 12 or later), which blocks other applications
Built-in AI AssistantOff unless the employer enables itIf enabled, the instructions say so before you start and your conversation with it is visible to the reviewer

HackerRank's candidate help lists what it treats as malpractice: copying code from books or websites, getting help from another person, submitting code that closely matches another candidate's, leaving full-screen mode and switching tabs. Treat that as the baseline and the employer's instructions as the rest of the rulebook. In plain terms: take the assessment on your own, in one window, using only what the test explicitly allows.

Accommodations and problems. Employers can add a time accommodation (presets from 25% to 100%, or a custom percentage), but only before you start the test, so ask the recruiter before you open it. If a network outage or other disruption hits during the test, reply to the invitation email right away and ask for a retake; HackerRank's help says retakes are at the company's discretion.

How to prepare: a two-to-three-week plan

HackerRank's Interview Preparation Kit groups practice problems by topic and shows the share of companies it says test each one. These are HackerRank's own figures, not an independent survey, but they are a sensible map:

TopicCompanies testing it, per HackerRank
Arrays70%
Dictionaries and hashmaps, sorting, string manipulation40% each
Greedy algorithms31%
Search30%
Dynamic programming27%
Stacks and queues17%
Graphs15%
Trees12%
Linked lists8%
Recursion and backtracking5%
  1. Days 1–3: learn the environment. Solve 8 to 10 easy problems on HackerRank itself, half as function stubs and half as full programs that parse STDIN, until input parsing and exact output formatting are automatic.
  2. Days 4–10: high-frequency topics. Arrays, hashmaps, strings and sorting, then greedy and binary search, two or three mediums a day. Note the pattern each problem used; our guide to the core LeetCode patterns maps common prompts to techniques.
  3. Days 11–15: add depth. Dynamic programming, stacks and queues, graphs and trees. They appear less often but tend to be the hardest question when they do.
  4. Final days: full simulations. Same number of questions and same time limit as your invite, one sitting, one window, no pausing. Then list the edge cases you missed.

An edge-case checklist for hidden tests

Read the constraints before you write code. As a rough rule, n up to around 100,000 needs O(n log n) or better, n in the low thousands usually tolerates O(n²), and n around 20 suggests an exponential search is acceptable.

Test-day checklist

  1. Use Chrome, Firefox or Edge on a stable connection, and take the Sample Test the day before.
  2. If proctored: one monitor, webcam on, good lighting, phone out of view, nothing else open.
  3. Open every question first, note the points, and start with the one you can finish fastest.
  4. Use the language you are quickest in.
  5. Submit a correct brute force, then optimize and resubmit.
  6. Remove debug prints where printed output is checked.
  7. With five minutes left, stop writing new code and run and submit everything.

After the assessment

Results come from the employer, not from HackerRank, and timelines vary by company. If you pass, the next step is usually a live technical interview where you explain your thinking while you code, a different skill from solving quietly against a timer. A free AI mock interview in CoPilot Interview is one way to practice it: paste the job description and your résumé, choose a coding or mixed set, answer out loud, and get a score on each answer with what worked and what to improve.

If your next employer uses a different platform, the mechanics change. See our guides to the CodeSignal assessment and the Amazon online assessment, or the broader new grad online assessment guide.

Practice the live round that comes next

Passing a HackerRank screen usually leads to an interview where you explain your code out loud. CoPilot Interview's free AI mock interview builds questions from your résumé and the job description, reads them aloud and scores each answer, with 15 free minutes a day and no credit card.

Try a free AI mock interview

FAQ

Does HackerRank give partial credit?

Yes, for coding questions. Your score is the sum of the points for each test case your code passes, so passing some hidden tests earns some credit, and employers can give harder test cases more points.

Can I see the hidden test cases on HackerRank?

No. You see whether each hidden test passed and, unless the employer turned it off, your own output and debug output, but never the hidden input or the expected output.

Can HackerRank tell if I switch tabs?

Yes. Tab proctoring is on by default in HackerRank tests and records how many times and for how long you leave the test window, and stricter modes can also enforce full screen and use your webcam. Stay in the test window for the whole session.

What happens if time runs out before I submit?

The test ends automatically. If you ran or submitted your code, HackerRank evaluates your latest run or submission, but its help articles disagree on whether code you typed and never ran counts, so run and submit as you go.

Will HackerRank send me my score?

No. The employer owns the report and decides whether to share your results; HackerRank does not send test reports to candidates.

Can I retake a HackerRank test?

Only if the employer allows it. If something like a network outage disrupted your attempt, reply to the invitation email and ask the recruiter for a retake.