
When the ServiceNow HackerRank invitation landed in my inbox three days after I applied for a Software Engineer role, I thought I knew exactly what to expect. I had heard from friends in previous hiring cycles that ServiceNow mostly tested standard array and string warmups. Then I opened my 90-minute test link and saw what the 2026 assessment actually looks like: three coding problems—starting with a sliding-window distinct subarray problem, escalating to a graph connectivity problem, and finishing with a tricky 0/1 knapsack dynamic programming scheduler where a greedy approach fails almost every hidden test case—plus a block of computer science and Java/SQL multiple-choice questions.
On that third coding problem (scheduling tasks across a paid primary server and a free background worker), my first instinct was to sort the tasks greedily by their cost-to-time ratio. It passed the first sample test case and immediately failed 9 out of 13 hidden test cases. With less than 25 minutes left on the clock, I used an AI interview assistant to check the state transition, realized the problem was a disguised O(n^2) 0/1 Knapsack DP, and typed in the clean bottom-up solution to pass 13/13 test cases before time expired.
In this guide, I am sharing my ServiceNow HackerRank online assessment questions along with the broader 2025–2026 question pool I compiled from fellow applicants across Intern, New Grad, IC2/IC3 Backend, Full-Stack UI, and Data Engineering tracks. I will walk you through the exact Python and SQL solutions, the multiple-choice traps, how HackerRank's proctoring and Code Playback flag candidates, and how I use Linkjob AI in both Desktop Floating Window Mode and Dual-Device Mode to clear the test safely without triggering a single warning.
Before you click "Start Assessment," you should check your invitation email to see which of ServiceNow's four HackerRank templates you were assigned. ServiceNow customizes the question mix and timer across Santa Clara, San Diego, Kirkland, Austin, Hyderabad, and European engineering hubs based on your role track.
This is the most common assessment sent to campus and early-career software engineering applicants.
Format and Timer: You will typically face either 3 coding questions in 90 minutes (pure coding format) or 2 coding questions + 10 to 15 multiple-choice questions (MCQs) in 90 minutes.
Difficulty Curve: Question 1 is a medium-easy warmup (sliding window, hash map, or string manipulation), Question 2 is a solid LeetCode Medium (monotonic stack, intervals, or BFS/Union-Find), and Question 3 is a Medium-Hard dynamic programming or graph optimization separator.
MCQ Topics: When MCQs are included, they test OOP concepts (Java inheritance, polymorphism, thread safety, HashMap internals), SQL joins and aggregations, time complexity analysis, and REST API fundamentals.
For experienced backend and core platform roles building on the Now Platform, the assessment typically runs 75 to 90 minutes with 2 to 3 medium-to-hard coding problems.
Here, ServiceNow emphasizes high-scale data processing and workflow dependencies: topological sorting of dependent tasks, disjoint-set cluster merging, prefix-sum + monotonic stack subarray problems, and rate-limiting / LRU cache implementations where O(n^2) code fails hidden n = 10^5 test cases with Time Limit Exceeded (TLE).
If you applied for a UI or Full-Stack role, your HackerRank test swaps out one of the general algorithmic prompts for a JavaScript / TypeScript asynchronous programming or DOM manipulation problem (such as building a bounded concurrent Promise runner or debounced search state manager) alongside frontend MCQs covering the JavaScript event loop (Promise microtasks vs. setTimeout macrotasks), closures, and CSS specificity.
For data-focused roles, the 90-minute HackerRank test combines 1 to 2 SQL coding questions (analyzing IT Service Management incident tickets, SLA breaches, and department hierarchies using window functions) with 1 to 2 Python data-transformation coding questions.
Below are the exact coding and SQL problems from my own test run and the highest-frequency confirmed questions from the 2026 ServiceNow HackerRank bank, complete with the traps that sink candidates and the clean code that passes all hidden test cases.
This was the hardest separator problem on my assessment, and it is one of ServiceNow's favorite ways to test whether you can tell the difference between a greedy heuristic and dynamic programming.
The Problem Prompt: You have n workflow tasks to execute (n <= 500). You are given two integer arrays, cost and time, each of length n. A primary paid server can execute task i in time[i] units of time for a fee of cost[i]. Meanwhile, a secondary free worker can execute any single task in 1 unit of time for $0, but only while the primary paid server is actively busy running a paid task. Return the minimum total cost required to complete all n tasks.
Why My First Greedy Idea Failed: At first, I sorted tasks by cost[i] / time[i] ascending. That failed hidden test cases because picking one slightly costlier task with time[i] = 4 lets the free worker clear 4 super-expensive tasks in parallel!
The Exact 0/1 Knapsack Formulation: Whenever you assign task i to the paid server for cost[i], that single decision clears 1 paid task + up to time[i] free tasks, meaning it covers 1 + time[i] total tasks! Therefore, the problem reduces to a 0/1 Knapsack where each item i has weight 1 + time[i] and price cost[i], and the goal is finding the minimum price to reach a total weight of at least n:
def min_cost_server_schedule(cost: list[int], time: list[int]) -> int:
n = len(cost)
# dp[j] = minimum cost to complete at least j tasks
INF = float("inf")
dp = [0] + [INF] * n
for c, t in zip(cost, time):
tasks_covered = 1 + t
# Traverse backwards from n down to 1 (0/1 Knapsack)
for j in range(n, 0, -1):
prev_state = max(0, j - tasks_covered)
if dp[prev_state] + c < dp[j]:
dp[j] = dp[prev_state] + c
return dp[n]
Complexity: This runs in O(n^2) time and O(n) auxiliary space—finishing n = 500 in less than 15 milliseconds and passing 100% of the hidden test cases.
My warmup coding problem modeled a ServiceNow log-monitoring stream where you need to find peak request volume across fixed-size windows without duplicate tenant IDs.
The Problem Prompt: Given an integer array requests of length n <= 100,000 and an integer window size k, find the maximum sum of any contiguous subarray of length k such that all k elements in the subarray are strictly distinct. If no subarray of length k contains k distinct elements, return 0.
The Trap: Calling len(set(requests[i:i+k])) == k inside a loop takes O(n * k) time and hits a TLE error whenever k = 50,000. Instead, maintain a sliding collections.Counter (or frequency dictionary) and curr_sum, updating the outgoing left element and incoming right element in O(1) time per step:
from collections import defaultdict
def max_distinct_window_sum(requests: list[int], k: int) -> int:
n = len(requests)
if n < k or k <= 0:
return 0
freq = defaultdict(int)
curr_sum = 0
max_sum = 0
for i, val in enumerate(requests):
curr_sum += val
freq[val] += 1
# Remove the element that slid out of the k-window
if i >= k:
left_val = requests[i - k]
curr_sum -= left_val
freq[left_val] -= 1
if freq[left_val] == 0:
del freq[left_val]
# When the window has size k and exactly k unique keys, update max_sum
if i >= k - 1 and len(freq) == k:
if curr_sum > max_sum:
max_sum = curr_sum
return max_sum
ServiceNow's platform revolves around IT infrastructure topology and service mapping, so graph connectivity problems appear constantly on the HackerRank OA.
The Problem Prompt: You have n microservices numbered 0 to n - 1 and a list of existing network cables connections where each [u, v] connects service u and service v. In one operation, you can unplug any redundant cable between two already-connected services and use it to connect two isolated services. Return the minimum number of cable movements required to connect all n services into a single unified network, or -1 if it is impossible.
My Clean O(n + m * alpha(n)) Union-Find Solution: First, connecting n nodes requires at least n - 1 edges—so if len(connections) < n - 1, I can immediately return -1! Otherwise, enough spare cables are guaranteed to exist, and the answer is simply number_of_connected_components - 1:
def min_cable_rewires(n: int, connections: list[list[int]]) -> int:
if len(connections) < n - 1:
return -1
parent = list(range(n))
size = [1] * n
components = n
def find(x: int) -> int:
while parent[x] != x:
parent[x] = parent[parent[x]] # Path halving for O(alpha(n)) speed
x = parent[x]
return x
for u, v in connections:
root_u = find(u)
root_v = find(v)
if root_u != root_v:
if size[root_u] < size[root_v]:
root_u, root_v = root_v, root_u
parent[root_v] = root_u
size[root_u] += size[root_v]
components -= 1
return components - 1
If your ServiceNow HackerRank assessment includes a SQL problem, it is almost always themed around IT Service Management (ITSM) incident tickets.
The Problem Prompt: Given an incidents table (incident_id, assignment_group, priority, opened_at, resolved_at, sla_minutes), write a SQL query to find, for every assignment_group that has handled at least 5 Priority-1 (priority = 1) incidents, the total count of Priority-1 incidents and the percentage of those incidents resolved within sla_minutes (rounded to 2 decimal places), ordered by SLA compliance percentage descending.
My Clean SQL Solution:
SELECT
assignment_group,
COUNT(*) AS total_p1_incidents,
ROUND(
100.0 * SUM(
CASE
WHEN TIMESTAMPDIFF(MINUTE, opened_at, resolved_at) <= sla_minutes
THEN 1
ELSE 0
END
) / COUNT(*),
2
) AS sla_compliance_pct
FROM incidents
WHERE priority = 1
AND resolved_at IS NOT NULL
GROUP BY assignment_group
HAVING COUNT(*) >= 5
ORDER BY sla_compliance_pct DESC, assignment_group ASC;
Real Interview Questions. Real Candidates. Continuously Updated
Our interview questions come from real job interviews taken by candidates using Linkjob AI. Based on actual interview experiences and continuously updated with new questions
If you are interviewing for a Full-Stack / UI Engineer or Platform Workflow role at ServiceNow, two additional coding tasks show up repeatedly: ordering dependent change requests via Kahn's Topological Sort (Python/Java) and executing asynchronous API calls with a Bounded Concurrency Limit (JavaScript/TypeScript).
Part A (Python — Change-Request Execution Order With Cycle Detection): Given num_tasks labeled 0 to num_tasks - 1 and prerequisite pairs [target, dependency], return a valid execution order, or an empty list [] if a circular dependency exists:
from collections import deque, defaultdict
def find_change_request_order(num_tasks: int, prerequisites: list[list[int]]) -> list[int]:
adj = defaultdict(list)
indegree = [0] * num_tasks
for target, dep in prerequisites:
adj[dep].append(target)
indegree[target] += 1
queue = deque([i for i in range(num_tasks) if indegree[i] == 0])
order = []
while queue:
curr = queue.popleft()
order.append(curr)
for nxt in adj[curr]:
indegree[nxt] -= 1
if indegree[nxt] == 0:
queue.append(nxt)
return order if len(order) == num_tasks else []
Part B (JavaScript — Bounded Concurrent Promise Pool for UI/Full-Stack OAs): Given an array of async task factory functions tasks (each returning a Promise) and an integer maxConcurrency, run at most maxConcurrency promises at the same time and resolve with an array of results in the exact original input order:
async function runWithConcurrencyLimit(tasks, maxConcurrency) {
const results = new Array(tasks.length);
let nextTaskIndex = 0;
async function worker() {
while (nextTaskIndex < tasks.length) {
const currentIndex = nextTaskIndex++;
results[currentIndex] = await tasks[currentIndex]();
}
}
const workerCount = Math.min(maxConcurrency, tasks.length);
const workers = Array.from({ length: workerCount }, () => worker());
await Promise.all(workers);
return results;
}
When I compared notes with other candidates who took the ServiceNow HackerRank OA over the past year, the same ten additional problems kept showing up across Intern, New Grad, and IC2/IC3 tracks:
Course Schedule II / Change-Request Execution Order (Topological Sort): Given num_tasks and prerequisite pairs [a, b], return a valid linear execution order of all tasks using Kahn's Algorithm (indegree queue) in O(V + E) time, or an empty array if a circular dependency exists.
Merge Overlapping Maintenance Windows: Sort intervals by start_time ascending and merge any interval where curr_start <= prev_end in O(n log n) time.
LRU Cache (O(1) Get and Put): Build a fixed-capacity cache for user session tokens using a doubly linked list + hash map (or Python's collections.OrderedDict with move_to_end).
Rotten Oranges / Server Outage Cascade (Multi-Source BFS): Push all initially failed servers into a deque at time = 0 and run level-by-level BFS to compute the minimum minutes until all adjacent servers fail.
Group Anagrams / Log Signature Clustering: Group strings that are anagrams of each other by using tuple(sorted(s)) or a 26-letter frequency tuple as a dictionary key in O(n * k) time.
Next Greater Element / Daily Ticket Spike (Monotonic Decreasing Stack): For each day i, find the next day with a strictly higher ticket volume in a single O(n) pass.
Trapping Rain Water: Compute trapped volume across elevation bars using two pointers (left, right) with left_max and right_max in O(n) time and O(1) space.
String Compression / Run-Length Encoding: Compress consecutive characters (such as "aaabbc" to "a3b2c1") in-place using a read pointer and a write pointer.
Longest Palindromic Substring / Count Palindromic Substrings: Expand around all 2n - 1 possible centers (both single-character odd centers and between-character even centers) in O(n^2) time and O(1) space.
Binary Tree Zigzag Level Order Traversal: Use a deque per BFS level, appending left-to-right on even levels and appendleft on odd levels.
If your test link includes the 10-to-15-question MCQ section, do not rush through it—those points count directly toward your composite recruiter rank. Here are the four MCQ topics I saw tested most heavily:
HashMap vs. ConcurrentHashMap)Expect questions asking what happens when two threads modify a standard HashMap simultaneously (ConcurrentModificationException or bucket corruption), why ConcurrentHashMap outperforms Hashtable and Collections.synchronizedMap() (lock striping / CAS operations on individual bins rather than locking the entire table), and why ConcurrentHashMap does not allow null keys or null values (to avoid ambiguity in concurrent lookups between "key not found" and "key mapped to null").
ON Clause vs. WHERE Clause in a LEFT JOIN)A classic ServiceNow MCQ trap gives you SELECT * FROM departments d LEFT JOIN employees e ON d.id = e.dept_id WHERE e.salary > 50000 and asks what happens to departments with zero employees. Putting e.salary > 50000 in the WHERE clause filters out NULL rows after the join, silently turning your LEFT JOIN into an INNER JOIN! To preserve empty departments, the condition must sit inside the ON clause (ON d.id = e.dept_id AND e.salary > 50000).
GET, PUT, DELETE vs. POST, PATCH)Remember that an HTTP method is idempotent if making the exact same request 10 times produces the exact same server state as making it once. GET, HEAD, OPTIONS, PUT (full resource replacement), and DELETE are idempotent, whereas POST (creating a new incident ticket on every call) is not idempotent.
If given a snippet mixing console.log("1"), setTimeout(() => console.log("2"), 0), and Promise.resolve().then(() => console.log("3")), remember that synchronous code runs first ("1"), the microtask queue (Promise.then / queueMicrotask) drains completely before the next tick ("3"), and the macrotask queue (setTimeout / setInterval) runs last ("2").
Before you think about switching browser tabs to search for the 0/1 Knapsack recurrence or pasting code from an external IDE, you need to know what HackerRank records behind the scenes. ServiceNow recruiters review both your automated test-case score and your HackerRank integrity log before advancing you to the technical phone screen.
Even if your specific ServiceNow HackerRank link does not ask for webcam access, Copy/Paste Tracking and Keystroke Code Playback are active by default on 100% of HackerRank tests.
Every time you paste text from your clipboard into the HackerRank editor, the platform flags the pasted lines in red on the recruiter's dashboard and logs the exact event on your Code Playback video. When a ServiceNow engineer clicks play on your session and sees 45 lines of Union-Find or DP code appear in a single keystroke frame without any incremental typing or intermediate test runs, your assessment is disqualified immediately.
blur / visibilitychange)When Tab Proctoring is toggled on, the browser listens continuously for DOM focus-loss events (window.onblur and document.visibilitychange). Clicking outside the browser window, switching tabs, or pressing a global keyboard shortcut that steals focus from your browser increments your tab-switch counter and logs how many seconds you spent away from the test.
On webcam-proctored ServiceNow assessments:
Periodic Webcam Snapshots: The browser captures snapshots throughout the exam and uses computer vision to flag missing faces, extra people entering the room, or repeated off-screen eye movement.
Multiple-Monitor Detection: HackerRank queries your system's display API to detect secondary monitors. Always unplug any external HDMI or DisplayPort monitor before opening your assessment link.
Focus-Stealing Hotkey Traps: Pressing global hotkeys mid-test to toggle poorly built screen overlays frequently triggers focus-loss logs or exposes the window during screen checks.
HackerRank converts your submitted code into an Abstract Syntax Tree (AST) and compares its structure against public solutions and prior candidate submissions. Furthermore, HackerRank's Secure Mode embeds invisible Unicode characters or hidden prompt instructions inside the problem statement so candidates who blindly copy-paste the prompt into an external window produce watermarked variable names in their code.
When I got stuck on the Paid vs. Free Server DP problem during my own ServiceNow HackerRank test, I needed a way to see the exact state transition and verify hidden edge cases without switching browser tabs, copying text to my clipboard, or pressing focus-stealing shortcut keys.
That is why I used an AI interview assistant to read the problem on screen and show me the exact O(n^2) knapsack logic and SQL syntax so I could type the solution naturally into the HackerRank editor myself. Depending on whether your ServiceNow invite is a standard web-page test or a strict webcam-proctored session, here is how I set up the two modes.
So here is how it works if your ServiceNow HackerRank test runs on a standard web page. You can directly use the floating window of the Linkjob AI desktop app right on your monitor.
The moment a coding prompt, SQL schema, or Java/CS MCQ appears on screen, the floating window analyzes the problem constraints and displays the clean solution and complexity breakdown right next to your code editor—with zero clipboard interaction and zero tab switching.
When using the desktop floating window on a web-based test, there are only two strict rules to watch out for:
Finish all relevant settings before the test starts: Choose your programming language (Python 3, Java, C++, JavaScript, or SQL), position the floating window near your code editor panel, and verify all preferences before you open the HackerRank link. Avoid clicking the app's Settings button during the test so your mouse focus never leaves the browser page.
Do NOT use Cmd + \ or Ctrl + \ to toggle the app during the test: Because HackerRank monitors global keyboard hooks and window focus changes, never press Cmd + \ or Ctrl + \ once your assessment timer starts. Just leave the floating window open in place—all other features work normally.

If you want extra security—or if your ServiceNow assessment runs under strict webcam Proctor Mode, Secure Mode, or requires a desktop lockdown client—you will need its Dual-Device Mode.
Under Dual-Device Mode, the Linkjob desktop app only runs silently in the background on my laptop with zero visible floating window or on-screen overlay, and all real-time code solutions, SQL queries, and MCQ answers display directly on my phone.
Here is why Dual-Device Mode is my favorite setup whenever webcam proctoring is active:
100% Clean Laptop Display: Even if the platform captures full-screen snapshots or checks for desktop overlays, your computer screen shows nothing except the official HackerRank test tab.
Natural Eye Line and Spotless Keystroke Playback: By propping my phone right below my laptop webcam, my eyes stay pointed straight toward the camera while I read the solution on my phone and type the code into HackerRank line by line at my normal typing pace—creating a 100% organic Code Playback log with zero clipboard pastes and zero focus switches.
You can choose between the Desktop Floating Window Mode and Dual-Device Mode based on your own scenario and how much extra security you want.
Even when a real-time AI interview assistant gives you the exact O(n) sliding window or O(n^2) knapsack algorithm immediately, how you type your code into HackerRank determines how your Code Playback timeline looks to the ServiceNow engineering reviewer. Follow these three habits:
Clear the MCQs in the First 12 Minutes: If your test includes 10 to 15 MCQs, knock them out first in about 45 seconds per question so you know the exact remaining clock for your coding problems.
Type Code in Logical Engineering Passes: Never type 40 lines from top to bottom without pausing. Write your helper state or find() function first, write the main loop second, and add boundary checks (if len(connections) < n - 1: return -1) third.
Click "Run Code" at Least Twice Per Problem: Always run the sample test cases midway through writing your solution and again before clicking "Submit" so your playback timeline shows normal, iterative testing behavior.
Most ServiceNow SWE Intern, New Grad, and IC1/IC2 candidates receive either 3 coding questions in 90 minutes or 2 coding questions plus 10 to 15 multiple-choice questions (MCQs) in 90 minutes. Senior Backend, Full-Stack UI, and Data Engineering tracks typically feature 2 to 3 specialized coding/SQL tasks in 75 to 90 minutes.
While ServiceNow does not publish an official numeric cutoff, passing all hidden test cases on at least 2 of the 3 coding questions and scoring 80%+ on the third coding problem and MCQs—paired with a clean proctoring and Code Playback report—consistently moves candidates forward to the live technical rounds.
For general Software Engineering tracks, you can choose between Python 3, Java, C++, C#, Go, and JavaScript/TypeScript. However, because ServiceNow's backend heavily uses Java and its frontend uses JavaScript/TypeScript, any MCQ sections on your test will frequently include Java OOP or JavaScript questions regardless of which language you pick for the coding prompts.
Yes. HackerRank enables Copy/Paste Tracking and Keystroke Code Playback by default on every test, and records browser focus loss (blur and visibilitychange) whenever Tab Proctoring is active. Pasting external code blocks or pressing focus-stealing shortcut keys will flag your recruiter report. Never copy-paste code, never press Cmd + \ or Ctrl + \ during a web-based test, or use Dual-Device Mode so all answers display on your phone while you type naturally into the editor.
After clearing the HackerRank OA, a ServiceNow recruiter typically reaches out within 3 to 10 business days to schedule your live interview loop. Depending on the level, this starts with a 45-minute technical phone screen followed by a 3-to-4-round virtual onsite loop covering Data Structures & Algorithms, Object-Oriented / System Design (such as designing a multi-tenant workflow notification service or rate limiter), and a hiring manager behavioral round focused on ServiceNow's core values (Wow Our Customers, Win as a Team, Create Belonging, and Stay Hungry and Humble).
Why People Choose Linkjob AI
Smoother interviews, coding challenges cleared, and job offers landed. See how users describe their experience with Linkjob AI—in their own words.
