---
title: "HackerRank assessment, explained"
url: "https://georgeliinternships.com/interview-prep/hackerrank-assessment.md"
canonical_url: "https://georgeliinternships.com/interview-prep/hackerrank-assessment"
last_updated: "2026-11-21"
type: "guide"
summary: "What a HackerRank assessment is, the format and rules the vendor publishes, a week-by-week plan and three original practice problems with checked answers."
related: ["https://georgeliinternships.com/interview-prep.md", "https://georgeliinternships.com/methodology.md", "https://georgeliinternships.com/roles.md"]
---

# HackerRank assessment for internships: format, preparation and practice

> **For AI agents:** the complete index of George Li Internships pages is [llms.txt](https://georgeliinternships.com/llms.txt). Every page is also served as markdown at its URL plus .md.

What a HackerRank assessment is, the format and rules the vendor publishes, a week-by-week plan and three original practice problems with checked answers.

A HackerRank assessment is a timed online test that an employer builds on the HackerRank platform and sends to a candidate, as one step of its process. The employer chooses the questions, the time and the integrity settings, so the format varies. This page covers what the vendor publishes about the environment and the rules, a four-week plan, how to work a problem under a timer and three original problems with checked answers.

## What is a HackerRank assessment, and who sends it?

HackerRank is a company that sells a hiring platform. An employer with a HackerRank for Work account creates a test, picks its questions, sets its settings and invites candidates. You do not choose to take a HackerRank assessment: you receive one from an employer, and the employer decides what is in it. That is why two people who both say they took a HackerRank test can describe different things.

We say nothing here about which employers use it, what any employer asks or how long any employer allows. Those details sit with the employer and change from one test to the next. What this page can do is describe what the vendor publishes about the environment and the rules, then train the skills that any timed coding test rewards. For the general picture of online assessments across vendors, read [online assessments explained](https://georgeliinternships.com/roles/software/online-assessments-explained.md).

## What does the format look like, according to the vendor’s own description?

HackerRank’s help center is written for the employers who build tests, so it describes the platform from their side. Four facts from it matter to a candidate. The pages are updated, so check them again before a test.

- Question types. The Proctor Mode page lists the types a test can use: approximate solution, code repository, code review, coding, database, diagram, file upload, multiple choice, projects, sentence completion, subjective and whiteboard. A single test may use only some of them.
- Code size. The execution environment page says the maximum allowed size for a code submission is 50 KB, which is far more than any timed answer needs.
- Multithreading. The same page says the platform supports multithreading in major languages and that total CPU time counts execution across all threads.
- Limits by language. The page lists a version, an execution time limit and a memory limit for every supported language and database.

Here is a slice of the limits table, copied in meaning from the vendor’s page on the date in the sources. The page is the authority, and a test may set its own limits, so treat this as a map of what the page says and not a promise about your test.

| Language | Version the page lists | Time limit (seconds) | Memory limit (MB) |
| --- | --- | --- | --- |
| Python 3 | Python 3.14.2 | 10 | 512 |
| Java 21 | OpenJDK 21.0.4 | 4 | 2048 |
| C++14 | G++ 8.3.0, C++14 standard | 2 | 512 |
| Go | v1.26.4 | 4 | 2048 |
| MySQL | Version 8.0.33 | 60 | 3072 |
| PostgreSQL | Version 14.3 | 60 | 2048 |
*A slice of the vendor’s execution environment table*

Read the table with one idea in mind: a time limit is per run of your program, and a slow algorithm fails by exceeding it even when its answers are right. A solution that checks every pair in an array of a hundred thousand entries is correct and still too slow. The habit that fixes this is in the plan below: before you code, say the cost of your approach and compare it with the size of the input.

## How should you prepare, week by week?

The plan below is our own and is built for a candidate who has four weeks and can give about an hour a day. Adjust the hours to your term. The point is the order: fundamentals first, then speed, then the full timed run.

| Week | Focus | What to do each day | What to check at the end |
| --- | --- | --- | --- |
| 1 | Language fluency | Write small programs in one language without looking anything up: read input, split strings, sort, use a dictionary and a set | You can write a loop, a function and a hash-based count from memory |
| 2 | Core patterns | One problem a day from arrays, strings, hashing, sorting and two pointers, each solved, then explained aloud | You can name the pattern before you code |
| 3 | Cost and edge cases | Say the running time of each solution, then test it on an empty input, one entry, repeated values and the largest size you expect | You catch the edge case before the test does |
| 4 | Timed runs | Two or three problems in a set time, in the editor you will use, with no outside help | You finish with a minute to read your code again |
*A four-week plan for a timed coding assessment*

Use the [coding prep schedule](https://georgeliinternships.com/tools/coding-prep-schedule.md) to put these weeks on a calendar, and the [coding and complexity practice](https://georgeliinternships.com/interview-prep/coding-and-complexity-practice.md) to learn to say the cost of a solution. If your assessment includes database questions, the same four weeks apply with SQL as the language.

## How do you read a problem, plan and test under a timer?

Our own view is that reading and planning cost more points in a timed test than typing does. A routine that takes two minutes at the start pays for itself.

1. Read the statement twice. Underline the input size and the limits. Write the output format beside it.
2. Write one small example by hand and work out its answer yourself. If you cannot, you have not understood the problem.
3. Say the plain approach and its cost, then ask whether the input size allows it. If not, name the pattern that removes the extra work.
4. Code the simplest version that is correct. Keep names short and the structure flat.
5. Run your own example, then an empty input, one entry and a repeated value, before you submit.
6. Leave a problem you are stuck on after a fixed number of minutes, submit what passes and come back with the time left.

The table below shows one timed attempt on a single problem. The minutes are invented to illustrate the proportions and are not a rule or a limit from any vendor or employer.

| Phase | Minutes | What happens |
| --- | --- | --- |
| Read and restate | 3 | Underline the input size, write the output format, state the problem in your own words |
| Hand example | 3 | Work one small case by hand so you know what the program must print |
| Plan and cost | 4 | Choose the approach, say its cost and check it against the input size |
| Code | 10 | Write the simplest correct version |
| Test and fix | 5 | Own example, empty input, one entry, repeated values |
| Total | 25 |  |
*An illustration of how one problem’s time can be spent (minutes invented)*

## What are the rules on outside help and tab switching, as the vendor states them?

The integrity settings belong to the employer, and HackerRank documents them in its help center. The vendor describes three levels. Quote the rules shown on your own test, not these, when you decide what to do, because the settings can differ between tests and the pages are updated.

- Built in. The Test Integrity page says copy and paste actions are tracked and pasted text appears in the candidate’s report for coding, subjective and sentence completion questions, and that tab proctoring tracks how often and for how long a candidate leaves the test window.
- Secure Mode. The Secure Mode page says it enforces full-screen, shows a warning when a candidate switches browser tabs, blocks copy and paste into the editor and allows a test to continue only on a single monitor, and that it logs violations in the candidate’s report.
- Proctor Mode, an AI add-on. The Proctor Mode page says it includes those controls and adds webcam access, screen sharing and periodic screenshots, flags a phone or a second face in the webcam feed and detects some external tools. It says the candidate reviews and acknowledges a list of prohibited actions and agrees to them before the test begins.

The practical reading is plain. The rules appear before the clock starts, so read them then. If a rule is unclear, write to the recruiter before the test, not during it. Prepare with the same setup you will use: one monitor, a clean desktop, a stable connection and the browser the test requires. Do your practice runs in the editor, with no pasted code, so a blocked paste never surprises you. We do not coach around these rules, and nothing on this page helps with outside assistance. If you have signed an agreement about an assessment, keep its contents to yourself.

> **A note on forums.** A forum post about a test you were invited to is an account of a different test, from a different date and with different settings. Treat the invitation and the rules screen as the only authority for your test.

## How do you practice with our own problems?

These three problems are our own, written for this site to train the habits above. They are not taken from any test. Work each on paper first, with a timer, then open the steps. Each one has a different pattern and a different cost to say.

**Problem 1.** An array holds 4, 2, 7, 1, 3, 5, 2, 6, 1, 4. Find the length of the longest run of consecutive entries whose sum is at most 12. Give an integer.

**Answer:** 4

1. All entries are positive, so extending a run never lowers its sum. That is what lets one window slide along the array instead of testing every run.
2. Keep a left edge and a right edge. Move the right edge one step and add the new entry. While the sum is above 12, move the left edge forward and subtract the entry it leaves.
3. Run the window and the longest run that fits is 1, 3, 5, 2, with sum 11 and 4 entries. Adding the 7 on its left makes 18 and adding the 6 on its right makes 17, so it cannot grow, and no run of 5 entries has a sum of 12 or less (the five-entry sums are 17, 18, 18, 17, 17 and 18).
4. Each entry enters the window once and leaves it at most once, so the work is O(n). Testing every start and end instead costs O(n^2), which is the answer to give first and then improve.

**Problem 2.** A grid has 4 rows and 6 columns. You start in the top left cell and move one cell at a time, either right or down, to the bottom right cell. The cells in row 2, column 3 and in row 3, column 5 are blocked. How many different paths are there? Give an integer.

**Answer:** 14

1. Let each cell hold the number of ways to reach it. The start holds 1, a blocked cell holds 0, and every other cell holds the sum of the cell above it and the cell to its left.
2. Row 1 is 1, 1, 1, 1, 1, 1. Row 2 is 1, 2, 0, 1, 2, 3, because the blocked cell in column 3 holds 0.
3. Row 3 is 1, 3, 3, 4, 0, 3, because the blocked cell in column 5 holds 0. Row 4 is 1, 4, 7, 11, 11, 14.
4. The bottom right cell holds 14. The table has 24 cells and each is filled once, so the work is O(rows x columns), against a recursion that would revisit cells.

**Problem 3.** How many different substrings of length 3 does the string bananabandana contain? Count a substring once however often it appears. Give an integer.

**Answer:** 8

1. The string has 13 characters, so it has 13 - 3 + 1 = 11 substrings of length 3, counting repeats.
2. Write them in order: ban, ana, nan, ana, nab, aba, ban, and, nda, dan, ana.
3. Put each one into a set. The repeats are ban twice and ana three times, so the set holds ban, ana, nan, nab, aba, and, nda and dan.
4. That is 8 different substrings. A set gives O(n) expected time for a fixed length, and saying what you store in it is the part an interviewer listens for.

A separate program rebuilds every answer above by a different route from the written steps: every window from prefix sums, a walk that lists the grid paths and a sort that counts the distinct values. Read [how the problems are checked](https://georgeliinternships.com/methodology.md). For interval problems, which follow the same sort-then-sweep habit, read [interval problems worked](https://georgeliinternships.com/interview-prep/coding/intervals.md).

## What comes next, in general terms?

After a timed test the employer receives a report. HackerRank’s pages describe post-test reports for the employer that, where integrity features are on, include a summary of integrity events. What the employer does with it is its own process: some invite a live interview, some send a second test and some send a decision. We cannot say which. Plan for a live technical round next by practicing the same problems aloud, and read [internship interview questions](https://georgeliinternships.com/interview-prep/internship-interview-questions.md) for the rounds that usually follow.

## Questions

### Is a HackerRank assessment the same for every employer?

No. HackerRank’s own help pages describe tests that an employer builds and configures, including the question types and the integrity settings, so the contents and the rules differ from one invitation to the next. Read the instructions on your invitation and ask the recruiter if anything is unclear.

### Which programming languages can I use?

The employer’s test lists the languages it allows, and HackerRank’s execution environment page lists what the platform supports, with a version, a time limit and a memory limit for each. Pick the language you can write fastest in, and confirm it appears on your test before the clock starts.

### Can I switch tabs or paste code during the test?

It depends on the settings the employer turned on. HackerRank describes modes that enforce full-screen, warn on a tab switch, block copy and paste and, in an add-on, use the webcam and screen sharing. Follow the rules shown on your test and do not rely on a forum’s account of another test.

## How a session helps

In a session George works a problem with you at the pace of a timed test, asks you to state the cost before you code and marks where the plan or the edge cases slipped. You write every line yourself. See the [packages page](https://georgeliinternships.com/packages.md) for the sessions, or [book a session](https://georgeliinternships.com/book.md). Questions before you book go by email to hello@georgeliinternships.com. The [software internship guide](https://georgeliinternships.com/roles/software.md) covers the wider search, and the [college student page](https://georgeliinternships.com/for/college-students.md) shows how a first session runs.

## Related

- [Internship interview prep](https://georgeliinternships.com/interview-prep.md)
- [Methodology and sources](https://georgeliinternships.com/methodology.md)
- [Internship role guides](https://georgeliinternships.com/roles.md)
