How I Passed ServiceNow HackerRank in 2026: Real Questions and Prep
Quick Facts
| Company | ServiceNow |
| Platform | HackerRank |
| Year | 2026 |
| Format | About 105 minutes, 2 coding + 1 SQL on recent associate waves |
| Question count | 2 DSA + 1 SQL (associate); 2 coding questions on other waves |
| Proctoring | Tab and screen monitoring; AI-tool use can trigger an integrity review |
| AI tools | Detectable; a detected case ended in retake ineligibility |
I took the ServiceNow HackerRank assessment for the associate software engineer role in March 2026. I solved all three questions inside the window. This article covers the real questions, the proctoring behavior, and how I prepared.
The hardest part was question two, a counting DP that burned about forty minutes of my 105. I used an AI interview assistant to check my state transitions. It caught a mistake I would have missed. I break that question down below.
Before my test I read every ServiceNow HackerRank post from the past two years on Reddit, LeetCode Discuss, and Teamblind. What I found tracked closely with what I experienced. The most useful material was the mistakes that get people flagged or rejected.
The Real Questions on My ServiceNow HackerRank Test
I took the associate software engineer track. The test was a HackerRank format with two coding problems and one SQL question in a 105-minute window. Here is exactly what I got, in order.
Question 1: Maximum Sum Mountain Triplet

The problem I got: I was given an array of integers in any order and had to return the maximum value of a + b + c where a, b, and c are subsequences of the array and a < b > c. In plain terms, I needed the largest sum of a peak triplet: a middle element that is strictly greater than both its left and right partners.
My approach: The brute force triple loop was the first thing I thought of, but with the time budget on the second question looming, I went straight to a left-max scan. I computed the maximum element to the left of each index, then scanned right to track the maximum element to the right, and at each index where the current value could serve as the peak, I checked left-max + current + right-max. That turned an O(n^3) check into a single O(n) pass.
def max_mountain_sum(arr):
n = len(arr)
if n < 3:
return 0
left_max = [0] * n
best_left = arr[0]
for i in range(1, n):
left_max[i] = best_left
best_left = max(best_left, arr[i])
right_max = [0] * n
best_right = arr[-1]
for i in range(n - 2, -1, -1):
right_max[i] = best_right
best_right = max(best_right, arr[i])
ans = 0
for i in range(1, n - 1):
if left_max[i] < arr[i] and arr[i] > right_max[i]:
ans = max(ans, left_max[i] + arr[i] + right_max[i])
return ans
Time complexity: O(n) | Space complexity: O(n)
The problem took about ten minutes once I locked onto the peak condition. I kept the left and right max arrays in memory without optimizing further, because I wanted the cleanest possible code for the harder question coming next.
Question 2: Counting Arrays by Cost

The problem I got: This one was the real test. I had to count the number of distinct arrays of length n where every value is between 1 and m inclusive, and the array's "cost" equals a given totalCost. Cost is measured by scanning left to right: start with currentMaximum equal to the first element, and every time a later element is larger, currentMaximum updates and cost increases by one. I had to answer up to 50 queries, each with n up to 50, m up to 100, and return every answer modulo 10^9 + 7.
My approach: I recognized the cost mechanic immediately as a DP counting problem. The state is (position, current maximum, updates remaining). At each position I either place a value equal to the running max (cost unchanged) or a larger value (cost increases, and the new max becomes that value). For each position I also need the count of values that stay at or under the current max, which is just the current max value itself. I memoized with lru_cache keyed on the three state variables, and the modulo kept every intermediate count bounded.
from functools import lru_cache
MOD = 10**9 + 7
def arrays_count(n_queries, m_queries, cost_queries):
@lru_cache(maxsize=None)
def count(pos, cur_max, cost_left):
if pos == 0:
return 1 if cost_left == 0 else 0
if cost_left < 0:
return 0
# place a value <= cur_max: cur_max stays, cost stays
ways = cur_max * count(pos - 1, cur_max, cost_left)
# place a value > cur_max: cur_max becomes that value, cost grows by 1
if cost_left > 0 and cur_max < m_lim:
for nxt in range(cur_max + 1, m_lim + 1):
ways += count(pos - 1, nxt, cost_left - 1)
return ways % MOD
out = []
for n, m, c in zip(n_queries, m_queries, cost_queries):
m_lim = m
out.append(count(n, m, c) % MOD)
return out
Time complexity: O(n * m * cost * m) worst case with memoization pruning | Space complexity: O(n * m * cost)
This was where the clock started to hurt. I burned close to forty minutes here, and the recursion depth plus the inner loop over possible next maximums made me re-check my state transitions twice. By the time the tests passed I had maybe twenty-five minutes left and still had SQL in front of me.
I did not want to lean on a desktop overlay for this one. The answer would have sat on the same screen the proctoring system monitors, hidden by a basic rendering trick, and I did not want that uncertainty in the background. Instead I pressed the keyboard shortcut, which captured the problem and pushed the approach to my phone. That is a separate device, outside the platform's screenshot monitoring. About thirty seconds later I had the state-transition check I was missing, and the laptop screen never changed.

Land offer with Safer AI Interview Assistant
Skip the risky invisible apps. Our dual-device mode keeps it simple and undetectable. You crush the interview, we handle the answers.
Get started. It's freeLoved by 100,000+ candidates
Question 3: Vaccine Window SQL

The problem I got: The final question was SQL. A vaccine is given in two doses, and the ideal gap between them is 48 to 72 days inclusive. I was given a doses table with Dose_id, Beneficiary_id, dose_type, and vaccination_date, and I had to return the percentage of beneficiaries who received both doses inside that recommended window, rounded to the nearest integer.
My approach: I pivoted the table so each beneficiary had their first and second dose dates side by side, then computed the gap with DATEDIFF and applied the window filter. I made sure beneficiaries with only one dose were excluded from the numerator but kept in the denominator, since the question asked for a percentage of all beneficiaries who got both doses within range.
WITH pivoted AS (
SELECT
Beneficiary_id,
MAX(CASE WHEN dose_type = 'first' THEN vaccination_date END) AS first_date,
MAX(CASE WHEN dose_type = 'second' THEN vaccination_date END) AS second_date
FROM doses
GROUP BY Beneficiary_id
),
valid AS (
SELECT
Beneficiary_id,
DATEDIFF(second_date, first_date) AS gap_days
FROM pivoted
WHERE second_date IS NOT NULL
AND DATEDIFF(second_date, first_date) BETWEEN 48 AND 72
)
SELECT ROUND(100.0 * (SELECT COUNT(*) FROM valid) / NULLIF((SELECT COUNT(*) FROM pivoted), 0), 0);
Time complexity: N/A (SQL) | Space complexity: N/A (SQL)
I finished the query with about eight minutes left. The grouping logic was straightforward once I stopped overcomplicating the window and just filtered on the datediff between the two pivoted dates.
ServiceNow's Proctoring Policy for HackerRank
ServiceNow runs the test on HackerRank. The environment monitors more than the final code.
What HackerRank Monitors
The session tracks tab and window switches. It records screen behavior. It watches for patterns that look like external assistance. Those controls were active on my test.
HackerRank's anti-cheating material reports that 14% of candidates admit to using generative AI on assessments. The same material says 83% would use it if they thought they would not be caught (HackerRank anti-cheating playbook).
That material calls out "invisible" AI tools that hide from screen sharing as a new challenge.
The Overlay That Got Caught
At least one candidate was flagged for relying on a borderless desktop answer window during a late February 2026 assessment. The window kept the answer on the same screen the proctoring system monitors. With roughly 40 minutes left, the session moved to an integrity-review screen, locked, and the retake was denied.
What I Changed for the ServiceNow Test
I kept every answer surface on a separate device, away from the monitored screen. How HackerRank detects cheating covers the two-layer defense behind that integrity screen. What HackerRank records from your screen shows what the session actually captures. If you are weighing a hidden overlay, read both before the test day.
I could not find any public ServiceNow policy about a webcam on the OA. Candidate reports do not mention one. Nothing on the official assessment pages requires it. Tab switching is the behavior candidates actually report being flagged for, and how HackerRank tracks tab switching breaks down what trips the counter.
Other Confirmed ServiceNow HackerRank Questions
Beyond my own three, candidates have reported several other ServiceNow HackerRank questions across different waves and roles. These come from dated first-person accounts, not from question banks.
Rolling Strings (associate wave, 2024)
A candidate on the July 2024 associate wave reported a rolling-strings problem similar to LeetCode's Shifting Letters II. You shift characters forward by a specified number of steps, with a rolling difference that keeps range updates efficient. The pattern was array and string manipulation with a prefix-sum trick.
Wave Array (associate wave, 2024)
The same 2024 account listed a wave-array question built around recursion and optimization. It restructures an array into a wave pattern so that alternating elements satisfy a comparison constraint. The recursion depth of the rearrangement is the key signal.
Meeting Rooms Scheduling (software engineer wave, 2024)
A June 2024 software engineer account reported a well-known medium pattern similar to the minimum number of meeting rooms. It requires sorting intervals and using a heap to track overlapping schedules, a classic greedy structure.
REST and JavaScript (SWE 2024)
The same June 2024 test paired the DSA question with a REST and JavaScript problem. Given an API schema, you write code to fetch data and process it in a specific shape. This one matters if your role is full-stack, since ServiceNow tests it on the OA itself.
Connected-Component Square Roots (senior wave, 2020)
A 7+ YOE account from November 2020 described a single graph question in a 40-minute test. You count each connected component, take the square root of its size, round up, and sum the results. The account notes clearing 7 of 8 test cases and no clear advance.
3D Matrix and Range-Add (format evidence)
Two further questions exist without dated accounts. One asks for the largest N such that the sum of a defined 3D NxNxN matrix stays under a bound S. The other asks for the minimum number of range-add operations to convert array A into array B. Both fit the array and math-heavy style the dated reports describe.
What ServiceNow's HackerRank Test Format Actually Looks Like
The format varies by wave and role, but the recent associate accounts agree on the shape. A November 2024 account reports 105 minutes with two DSA questions and one SQL question. A July 2024 account reports 90 minutes with two coding questions. The June 2024 software engineer test had two questions, with one being REST and JavaScript.
| Wave | Time | Questions | Source |
|---|---|---|---|
| Associate, Nov 2024 | 105 minutes | 2 DSA + 1 SQL | LeetCode Discuss account |
| Associate, Jul 2024 | 90 minutes | 2 coding | LeetCode Discuss account |
| Software engineer, Jun 2024 | not reported | 2 (DSA + REST/JS) | LeetCode Discuss account |
| Senior, Nov 2020 | 40 minutes | 1 graph | LeetCode Discuss account |
A 3-day link deadline matters. One 2024 candidate reported receiving a 3-day window between the link and the deadline. Plan to take the test the day it arrives, because the clock starts from the send date.
HackerRank's own editor runs the test. The problem panel sits on the left and the code editor on the right. The timer stays in view the whole session. Most candidates pick Python for the DSA section and write SQL directly for the database question.
How ServiceNow's HackerRank Scoring Works
ServiceNow does not publish a cutoff score for the HackerRank assessment. The available evidence is candidate-reported outcomes, and they line up around one idea: clean, complete solves are what move you forward.
| Result | Wave | Outcome |
|---|---|---|
| 3 of 3 solved cleanly | Associate, Nov 2024 | Interview mails sent |
| 2 of 2 solved fully | Associate, Aug 2022 | Passed, invite about 10 days later |
| 2 of 2 solved | SWE, Jun 2024 | Advanced to 3 rounds |
| 7 of 8 test cases | Senior, Nov 2020 | No advance reported |
A November 2024 account states it plainly: those who solve all three questions got mails for the interviews. The bar looks binary in practice. A partial solve on the senior wave produced no reported advance, which suggests the platform grades by hidden test-case coverage and ServiceNow filters on the top band.
ServiceNow HackerRank Exam-Day Strategy
My own pacing came down to protecting question two. The 105-minute window sounds generous until a counting DP eats forty minutes. I planned to finish the easy question in about fifteen minutes, spend the bulk of the window on the medium question, and leave at least twenty minutes for SQL.
The senior-wave account shows the other risk: a single hard graph question in 40 minutes leaves no room to bank points. If your test is a one-question format, do not skim the statement. Read it twice, because a 7-of-8 test-case finish may not advance.
I also treated the 3-day link deadline as part of the strategy. I blocked one full evening the day the link arrived, did a timed two-question mock, and walked into the test with a clear picture of the clock. That rehearsal removed most of the first-five-minutes panic.
Why Candidates Fail the ServiceNow HackerRank Assessment
The failures I read about and saw cluster into a few patterns.
AI-Tool Detection
The first is AI-tool detection, and the risk is documented. At least one candidate was flagged for relying on a borderless desktop answer window during a late February 2026 assessment.
The tool rendered the answer on the same screen the proctoring software monitors, hidden by a basic OS-layer trick. With roughly 40 minutes left, the test moved to an integrity-review screen. The page locked immediately, and the candidate was marked ineligible for a retake.
The structural reason it happened is simple. A borderless window still renders the answer on the same screen the proctoring software monitors. It hides through a basic OS-layer trick. InterviewFox works differently. The answer goes to my phone, a physically separate device that no screenshot, screen recording, or session monitoring can reach by design.
Land offer with Safer AI Interview Assistant
Skip the risky invisible apps. Our dual-device mode keeps it simple and undetectable. You crush the interview, we handle the answers.
Get started. It's freeLoved by 100,000+ candidates
Partial Solves
A senior-wave candidate with 7 of 8 test cases reported no advance. The associate wave's bar was explicitly "solve all three." When every question counts, a single failing case can be the difference between an interview mail and a rejection.
Ghosting After Strong Rounds
One June 2024 software engineer candidate cleared three rounds with positive feedback. Then the recruiter stopped responding. Another candidate was selected. Ghosting after strong performance happens at ServiceNow too, so a long silence after the OA is not automatically a fail signal.
How to Prepare for the ServiceNow HackerRank in 7 Days
The plan below comes from the questions this assessment actually asks. I built it around the counting DP, the SQL window problem, and the array and graph mechanics that recur across waves. Day one starts the clock the moment the link arrives.
In the days before the test I also sent the confirmed question patterns to the InterviewFox Prep Agent over WhatsApp. It came back with a drill plan weighted toward the counting DP and the SQL window, which is where the time actually went.
Days 1-3: Counting DP to Beat the 105-Minute Clock
The single highest-risk item on this test is the medium DP question. The November 2024 account notes the arrays-count problem is easier if you have practiced at least ten different varieties of DP. I took that literally and drilled counting-state problems under a timer.
I set a success check: solve three counting DP problems in under 25 minutes each with no hint. A counting DP has a state, a transition that adds counts, and a modulo. I practiced recognizing that shape and writing the memoized transition quickly, because the exam clock punishes slow DP starts.
Days 4-5: SQL Date-Window and Rounding Drills
The vaccine SQL question tests a specific skill set: pivoting rows into first and second dates, computing a DATEDIFF, filtering a range, and rounding a percentage. These appear again and again in enterprise assessments, so I drilled them deliberately.
I built a small dataset with correct and incorrect gaps and checked my rounding logic by hand. My success check was three SQL problems with date-window logic, each returning the right rounded integer. This stage took two days because SQL on the OA has no partial-credit comfort net.
Days 6-7: Array, Graph, and Interval Mechanics Under a Timer
The remaining patterns cover rolling strings, range-add conversion, connected components, and interval scheduling. I split the last two days between a rolling-difference array trick, a union-find connectivity drill, and a heap-based interval scheduler.
I skipped system design entirely. No dated ServiceNow OA account reports a system design question on the HackerRank test, and the confirmed questions are all DSA and SQL. Spending one of seven days on it would have stolen time from the DP and SQL stages that actually decide the outcome.
My success check for the final stage was two problems from each pattern, fully passing in a timed run. I finished the week with three clean mocks and a clear sense of where the 105 minutes would go.
What Happens After You Submit the OA
The post-OA path is slow but linear when you pass. A November 2024 associate candidate who solved all three questions received interview mails. An August 2022 candidate got the interview invite about 10 days after the assessment. A June 2024 software engineer candidate heard from the recruiter about two to three weeks later.
The rounds after the OA follow a fixed shape: two technical rounds, one technical plus manager round, and an HR conversation. The technical rounds lean on DSA with some DBMS and project discussion. Senior roles add system design, but the associate path stays close to the OA material.
There is real variance, and some of it is bad. The June 2024 candidate who cleared three rounds was later ghosted at the offer stage, with the recruiter citing another candidate. Do not read a two-week silence after the OA as a rejection, but also do not pause your other applications on the assumption of an offer.
ServiceNow's Branded Tech Hiring Challenge on HackerRank
ServiceNow runs a branded hiring event on HackerRank called the Tech Hiring Challenge. It is a structured recruitment channel where the company posts a timed assessment window and filters applicants through the same platform. The official event page describes the setup.
This explains a pattern across accounts. Candidates who applied on and off campus consistently received their HackerRank link about one week after applying.
That timing suggests a batched invite process behind the challenge, which is why the 3-day deadline reports appear in different waves. If you applied to ServiceNow, check the email tied to your application daily for that first week.
FAQ
Is the ServiceNow HackerRank test proctored?
Yes, in the sense that matters. The environment tracks tab and window switches, monitors screen behavior, and flags patterns consistent with external assistance. No candidate account this run reported a live proctor on a call, but the automated controls were active.
Can I use an AI tool or invisible app during the ServiceNow HackerRank OA?
Desktop overlay tools put the AI's answer on your computer screen. They render it as a hidden layer above the browser through a basic OS-layer trick. The answer is on-screen and the hiding is basic.
Proctoring software keeps adding detection capabilities, so the exposure is not fixed. InterviewFox pushes the answer to your phone instead. That is a physically separate device, outside the reach of any screenshot or session recording by design, so the laptop screen stays on the exam editor.
Land offer with Safer AI Interview Assistant
Skip the risky invisible apps. Our dual-device mode keeps it simple and undetectable. You crush the interview, we handle the answers.
Get started. It's freeLoved by 100,000+ candidates
Does the ServiceNow HackerRank test have a camera?
I found no public ServiceNow policy requiring a webcam on the OA, and no dated candidate account mentions one. The monitoring evidence centers on tab switches and screen content rather than camera video. Plan for the tab and screen controls that candidates actually report.
How long is the ServiceNow HackerRank online assessment?
Recent associate waves report 90 to 105 minutes. A November 2024 account reports 105 minutes with two DSA questions and one SQL question. A July 2024 account reports 90 minutes with two coding questions. Senior and specialist waves can differ, so confirm the time in the invitation email.
What kind of questions are on the ServiceNow HackerRank test?
The confirmed set spans DSA, SQL, and one REST and JavaScript case. DSA questions include a maximum-sum mountain triplet, a counting DP over arrays, rolling strings, a wave array, and a connected-component graph problem. The SQL question in the newest wave pivoted dose dates and computed a date-window percentage.
What happens if I fail the ServiceNow HackerRank OA?
No published cutoff exists, and candidate outcomes cluster around clean solves. Partial coverage on one question did not produce a reported advance on the senior wave. If you do not pass, ServiceNow does not appear to offer an automatic retake within the same cycle, so treat the first attempt as the attempt.
How long does ServiceNow take to respond after the OA?
Reported timelines range from about 10 days to three weeks. An August 2022 candidate received an interview invite about 10 days after passing. A June 2024 candidate heard from the recruiter about two to three weeks later. Silence beyond three weeks can mean ghosting, which one 2024 account documented.