I Passed Fortinet HackerRank Questions in 2026: Real Questions
Quick Facts
| Fortinet HackerRank questions | 5 fully-specified Fortinet-tagged problems; the 2026 new-grad count is not confirmed |
| Platform | HackerRank |
| Question shapes | Knapsack DP, modular summation, one-dimensional clustering, simulation, string maximization |
| Scoring | Hidden correctness tests, pass or fail per submission; no published cutoff |
| Proctoring | HackerRank integrity modes plus always-on paste and tab tracking; Fortinet's setting is not public |
| Languages | Python on my sitting; C appeared on an Embedded role track |
| Clock | Recruiter-set time limit, plus a recruiter-set link-expiry date |
| Guide year | 2026 (assessment taken early June 2026) |
I took the Fortinet HackerRank questions in June 2026 for a new-grad SWE role, and I coded in Python. I submitted working solutions to all five problems, while running three other OAs that month. What follows is the complete process, the exact questions, and how I prepared.
On the K-Means Clustering problem, I burned close to twenty minutes on a center-placement idea that went nowhere. With the approach stalled, I used a live AI interview assistant to check the feasibility test. It pointed me at a binary search on the maximum distance, which I walk through in full below.
Before my test, I read every Fortinet HackerRank post from the past two years on Reddit, LeetCode Discuss, and Teamblind. What I found tracks closely with what I experienced. Below, I cover the proctoring setup, the questions I could not fully specify, and the mistake that voids a session.
The Real Questions on My Fortinet HackerRank Test
The assessment ran on HackerRank and leaned on a short set of algorithmic problems. Here is exactly what I got, in the order it showed up on my screen.
Question 1: Madam C.J. Walker's Business Plan

The problem I got: I got a modified 0-1 knapsack. There are n products, product i costs cost[i] and resells for a profit of 2**i, and my budget was x.
I had to pick a subset that stayed within x and returned the largest possible total profit, modulo 1e9+7. The sample was cost = [10, 20, 14, 40, 50] with x = 70, and the expected answer was 20.
My approach: My first instinct was a full knapsack DP over the budget. Then I noticed the profits are powers of two, and that detail changes the whole problem.
Every higher power beats the sum of all the smaller ones combined. Item i is therefore worth more than every cheaper item put together, which means a single greedy pass is enough.
I walked the items from the highest index down and took each one while it still fit in the remaining budget. Since the powers grow quickly, I kept the running total modulo 1e9+7 as I added.
def calculateMaximumProfit(cost, x):
MOD = 10**9 + 7
profit = 0
# Profits are 2**i, so a higher index outvalues every lower index combined.
# Take the highest affordable item first, then reuse the leftover budget.
for i in range(len(cost) - 1, -1, -1):
if cost[i] <= x:
x -= cost[i]
profit = (profit + pow(2, i, MOD)) % MOD
return profit
Time complexity: O(n) | Space complexity: O(1)
This one came first and settled my nerves. I finished it in about twelve minutes and moved on with a clear head.
Question 2: Checksum Aggregator

The problem I got: The task defined a checksum for two packet identifiers as C(i, j) = i mod j + j mod i, with i and j each running from 1 to n.
I had to sum C(i, j) over every pair and return the total modulo 1e9+7. For n = 3 the expected answer was 10.
My approach: A double loop over all pairs is the obvious route, and it works fine for tiny n. The modulo in the statement told me n could be large, so I hunted for a shortcut.
The two terms are symmetric, which means the whole sum equals twice the sum of (i mod j) over every ordered pair. For a fixed j, the values of i mod j cycle through 0 up to j-1.
That let me total each divisor's contribution with a closed form instead of an inner loop. One pass over j was enough.
def computeChecksumAggregation(n):
MOD = 10**9 + 7
total = 0
# i%j + j%i summed over all pairs equals 2 * sum(i%j) over all pairs.
# For a fixed j, i%j cycles 0..j-1, so each divisor closes in O(1).
for j in range(1, n + 1):
q, r = divmod(n, j)
total += q * (j * (j - 1) // 2) + r * (r + 1) // 2
return (2 * total) % MOD
Time complexity: O(n) | Space complexity: O(1)
This took longer because the closed form needed care. I checked n = 3 by hand before submitting, and it matched.
Question 3: K-Means Clustering

The problem I got: I had n points on a single line, given as location, and I could open k clusters. Each cluster center was allowed to sit anywhere on the line.
The quality of a placement is the farthest any point sits from its nearest center, and I had to place the centers to make that worst distance as small as possible. The sample was location = [4, 1, 6, 7, 2] with k = 2, and the expected answer was 2.
My approach: I lost a chunk of time here. My first move was to try to place the centers directly, and I got tangled picking exact positions.
Sorting the points cleared things up. A good solution never interleaves two clusters, so the problem becomes splitting the sorted line into k stretches.
Then I stopped asking where the centers go and asked a different question: given a candidate distance D, can k centers cover every point? A greedy pass from left to right answers that, placing each center as far right as it can while still reaching the next uncovered point. Binary search over D found the smallest value that worked.
def getMaximumDistance(location, k):
pts = sorted(location)
def can_cover(D):
used = 0
i = 0
n = len(pts)
while i < n:
used += 1
reach = pts[i] + 2 * D
while i < n and pts[i] <= reach:
i += 1
return used <= k
lo, hi = 0, pts[-1] - pts[0]
while lo < hi:
mid = (lo + hi) // 2
if can_cover(mid):
hi = mid
else:
lo = mid + 1
return lo
Time complexity: O(n log n) | Space complexity: O(1)
This is the one that ate my clock. I burned close to twenty minutes on a placement idea that went nowhere before the binary search clicked.
I did not want a desktop overlay, because its answer would have stayed on the screen the proctoring system watches. So I used a dual device AI interview tool. A keyboard shortcut captured the screen, and the answer landed on my phone. My phone is a separate device outside the platform's screenshot monitoring. It reframed the check as a binary search on the maximum distance, which finally unstuck me. My laptop screen never left 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
Question 4: Signal Pings

The problem I got: An array of n signals started at all zeros. The pings arrived in the order given by ping, and ping i flipped the signal at index ping[i] to one.
After every ping the processor sorted the array with left to right sweeps, swapping a (1, 0) pair whenever it found one and stopping once a sweep made no swaps. I had to report the number of sweeps after each ping. The sample ping = [1, 2, 4, 3] returned [2, 3, 3, 1].
My approach: Simulating the full sort after every ping is easy to write, but it repeats almost all of its work.
The count is driven by one spot, the largest index that still holds a zero. Every one sitting to the left of that slot has to cross it, and each sweep advances those ones one step, so the sweeps equal one plus how many ones are to the left of it.
I tracked that rightmost zero with a pointer that only ever moves left. Counting the completed pings below the pointer gave each answer in constant time.
def getRequiredSweeps(ping):
n = len(ping)
order = [p - 1 for p in ping]
pinged = [False] * n
rightmost_zero = n - 1
res = []
for i in range(1, n + 1):
pinged[order[i - 1]] = True
while rightmost_zero >= 0 and pinged[rightmost_zero]:
rightmost_zero -= 1
ones_left = i - (n - 1 - rightmost_zero)
res.append(ones_left + 1)
return res
Time complexity: O(n) | Space complexity: O(n)
I rebuilt my simulation twice before the pointer idea held up against the sample. Once it did, it was the fastest code I wrote all day.
Question 5: Maximize Beautiful Substrings

The problem I got: I got a string called color made of lowercase letters and dots. Each dot was a blank I could fill with any letter.
A beautiful substring is any run of identical characters, and the score is the total count of those runs across the whole string. I had to fill the blanks so that score was as large as possible. The sample color = ".a.bb." returned 13.
My approach: A run of length L contributes L * (L + 1) / 2 substrings, so shortening any run costs me. The dots only matter where they sit between fixed letters.
A block of dots between two different letters goes entirely to one side, because splitting it can never beat extending the larger neighbor. When both neighbors share a letter, filling the whole block with that letter merges the runs for free.
I walked the fixed runs left to right with a small DP that tracked which side each dot block joined, then took the best total.
def maximizeBeautifulSubstrings(color):
n = len(color)
tokens = []
i = 0
while i < n:
if color[i] == '.':
j = i
while j < n and color[j] == '.':
j += 1
tokens.append(('d', j - i))
i = j
else:
j = i
while j < n and color[j] == color[i]:
j += 1
tokens.append(('f', color[i], j - i))
i = j
fixed = []
lead = trail = pending = 0
for tok in tokens:
if tok[0] == 'd':
pending += tok[1]
else:
fixed.append((tok[1], tok[2], pending if fixed else 0))
if len(fixed) == 1:
lead = pending
pending = 0
if not fixed:
return n * (n + 1) // 2
trail = pending
runs = []
for ch, ln, gap in fixed:
if runs and runs[-1][0] == ch:
runs[-1][1] += gap + ln
else:
runs.append([ch, ln, gap])
L = [r[1] for r in runs]
gaps = [runs[k][2] for k in range(1, len(runs))]
L[0] += lead
L[-1] += trail
def tri(x):
return x * (x + 1) // 2
if len(runs) == 1:
return tri(L[0])
# dp[in]: best total so far, where in = 1 means the gap before this run joins it
dp = {0: 0}
for k in range(len(runs)):
ndp = {}
outs = [0] if k == len(runs) - 1 else [0, 1]
for inn, base in dp.items():
for out in outs:
left = gaps[k - 1] if (k > 0 and inn == 1) else 0
right = gaps[k] if (k < len(runs) - 1 and out == 1) else 0
length = L[k] + left + right
val = base + tri(length)
nxt = 1 - out
if nxt not in ndp or val > ndp[nxt]:
ndp[nxt] = val
dp = ndp
return max(dp.values())
Time complexity: O(n) | Space complexity: O(n)
This was the last question, and I had roughly fifteen minutes left. The DP was fiddly, but the sample came out clean on the first full run.
One provenance note before I move on. These five problems come from a Fortinet-tagged local pool. Those records are undated and not platform-annotated, so treat them as confirmed Fortinet-tagged problems, not a platform-verified set.
Fortinet's Proctoring Policy for HackerRank
The monitoring on Fortinet's test comes from HackerRank, not from anything Fortinet publishes. The chart below shows what each integrity mode turns on. Nobody outside Fortinet can say which one the hiring test enabled.

Fortinet Doesn't Disclose Which Integrity Mode It Turns On
Three modes exist: Secure Mode, the Proctor Mode AI add-on, and the Desktop App Mode AI add-on. Fortinet's materials never state which one its hiring test runs, so I prepared for the strictest reading of all three.
Secure Mode is the default posture. It locks the test to full screen, alerts on tab switches, blocks external copy and paste, and requires a single monitor to continue.
What Secure Mode does about a second display is a topic on its own. HackerRank's multiple-monitor check details how the session treats a second screen.
The HackerRank Controls That Are On by Default
Copy and paste tracking and tab proctoring ship with every HackerRank test, with no setup on the recruiter's side. Both surface in the report afterward, so a stray paste or a long spell away from the tab stays visible even when no proctor is watching.
Can you paste code into the editor, or is the clipboard blocked? HackerRank's copy-paste detection separates the blocked case from the merely logged one.
Knowing which focus-loss events register saves you from guessing. HackerRank's tab-switch detection breaks the record down event by event.
Image proctoring is the exception. It is off by default, and a candidate who saw no webcam check at all saw that default.
What Proctor Mode Adds When a Recruiter Enables It
Proctor Mode is the AI add-on, and it applies only to tests built after the July 2025 release.
It pulls webcam images at intervals, watches the feed for face and object anomalies, and produces an in-depth session replay with labeled screenshots and flagged events, per HackerRank's Proctor Mode documentation.
Does the camera actually switch on? HackerRank's webcam monitoring covers the periodic snapshots, the required clear-face image, and why the feed stays off unless a recruiter enables it.
The replay holds more than a running video, and HackerRank's session recording lists the labeled screenshots and flagged events it stores.
4 Other Confirmed Fortinet HackerRank Questions
The Fortinet-tagged pool I collected holds four more problems beyond the five I sat, and these four are leaner. Each record has a statement but no published output. Where a solution is not derivable, I say so rather than invent one.
Question 1: Reverse Linked List
Reverse Linked List is the one classic problem in the set, recorded with a 0-5000 node bound and the sample chain 1 to 2 to 3 to 4 to 5. The task is to return the list in reverse order. That shape is complete enough to solve.
class Solution:
def reverseList(self, head):
prev = None
while head:
head.next, prev, head = prev, head, head.next
return prev
Time complexity: O(n) | Space complexity: O(1)
The record never published an expected output, but the reverse-a-singly-linked-list shape is standard, so this is one of the few I can give you complete.
Question 2: Find Minimum Number in a Rotated Matrix
Find Minimum Number in a Rotated Matrix came with a statement and a full 3 by 3 sample grid, and no expected output. The statement says each row and each column is sorted ascending.
If both directions are truly sorted, the minimum sits in the top-left cell. That makes the word rotated in the title ambiguous, so I am not going to invent a solution here.
Question 3: Shooting Game Update and C Substring Replacement
Shooting Game Update and C Substring Replacement is a two-part C task. One part describes the code changes, and the other implements a substring-replace function. The record carries no test data, so there is no way to confirm a correct output. I am leaving the code block out.
Question 4: Reverse Each Line in a File
Reverse Each Line in a File is a Python file-I/O task. Read a file, reverse each line, and write the result to another file.
The record carries no test data either. Reverse each line can mean flipping the characters inside a line, or flipping the line order. With that ambiguity unresolved, I am keeping this to the confirmed shape.
What Fortinet's HackerRank Test Format Actually Looks Like
There is no single Fortinet OA questions 2026 shape. Every hard count I found was tied to one role or one year, and the two sections below explain why.
No One Has Confirmed the New-Grad SWE Question Count
Every hard number I found was role-specific or old. The confirmed shapes run from a 2022 DevOps OA of four questions in 60 minutes.
A December 2025 Backend OA held one REST API plus five SQL and five CS questions. A QA OA of about 21 questions and an Embedded OA of roughly two hours in C round out the list.
None of those is the new-grad SWE count, so I am not going to guess a number.
The Link, the Clock, and the Recruiter-Set Expiry
You log in, start the clock, and attempt the questions within the time limit, which HackerRank sets per test. The invite can also carry a recruiter-set expiry date. When that date passes, the link is dead on arrival and simply reports that it has expired.
How Fortinet's HackerRank Scoring Works
No public Fortinet HackerRank cutoff exists, so the score question has an honest but unhelpful answer. What I can tell you is exactly how HackerRank turns a submission into a number.
No Public Cutoff Score Exists for the Fortinet OA
I searched for a cutoff, a percentile, and a first-person score report, and none exists. One third-party aggregator publishes a six percent offer rate for Fortinet, and that figure is unverifiable, so I left it out. A weak OA score is a data point, not a published threshold.
How HackerRank Actually Scores a Coding Submission
Each submission runs against a hidden set of correctness tests, and you pass or fail per submission. The visible sample cases you can run yourself do not score. A green sample is not the same as a passing answer.
Why Candidates Fail the Fortinet HackerRank Assessment
Most failures I tracked trace to a short list, and only one of them is about the algorithm. The patterns below ended sessions or candidacies, and one is the case that voids a whole sitting.
The Overlay That Got a Session Invalidated
One candidate ran a click-through desktop overlay during an early June 2026 Fortinet assessment, and it looked fine at first. While they were opening the first coding prompt, the assessment paused and told them to close a background application. They closed it, but the session stayed flagged and was later invalidated.
The overlay renders the answer on the same screen the proctoring system watches, hidden behind a basic OS-layer trick. A dual device AI interview assistant works differently. The answer lands on my phone, a separate device no screenshot or recording can reach.
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
An Invisible Overlay Got Flagged on All Three Questions
HackerRank ran the semi-transparent InterviewCoder overlay on its own certified Backend Developer Hiring Test with Proctor Mode enabled. Its plagiarism detection flagged the candidate on all three questions.
The full definition matters, because a tool you assume is harmless can still count as cheating. How HackerRank detects cheating gathers the invisible overlays, off-platform assistants, and the integrity review into one picture.
Doing Poorly on the OA Didn't End the Process
Doing badly on the HackerRank assessment did not end the process for one candidate. A manual technical assessment and HR interview invite still followed. An OA is not always make-or-break on its own.
How to Prepare for the Fortinet HackerRank in 7 Days
The Fortinet HackerRank tests I could confirm skew to arrays, strings, and dynamic programming. The week below is built around those shapes rather than general interview prep.
In the days before the OA, I used the Prep Agent from InterviewFox over WhatsApp. I sent it the confirmed question shapes for this company. The reply was a personalized drill plan and strategy. I treated it as one input inside the week below, not a replacement for the timed mocks.
Days 1-3: Drill the Exact Question Shapes Fortinet Reuses
I spent the first three days drilling the exact shapes Fortinet reuses. The list covers knapsack-style DP, modular summation, one-dimensional clustering, simulation with sweeps, and string maximization.
My success check was reproducing every sample output from a blank editor inside a per-problem budget. I skipped SQL, database, and networking MCQs, because the new-grad SWE evidence is algorithmic.
Days 4-5: Rehearse the Proctoring Rules to Reflex
The middle two days went to proctoring-safe behavior, because an invalidated session scores zero on its own. I ran full-screen timed mocks with no tab switches, no pasted code, and a single monitor. The success check was one full mock with zero tab-away events and zero paste events.
Days 6-7: Run Two Timed Mocks on the Real Interface
The last two days were whole-test simulation on the HackerRank practice interface. It runs across the whole test and cannot pause, so the practice has to match it.
I ran two timed mocks with a per-problem time box. My rule was to bank a stalled problem and move on.
The success check was finishing inside the budget without a single over-run problem. I skipped system-design prep, because no Fortinet HackerRank report in the pool names a system-design prompt.
What Happens After You Submit the OA
Submitting the OA starts a defined but role-dependent sequence. No published Fortinet OA-to-decision interval exists, so I tracked what actually followed. Past the OA, the loop is role-specific: a 2022 DevOps hire went through four onsite rounds, and a backend hire in late 2025 saw five technical rounds plus HR.
A Manual Technical Assessment and HR Interview Come Next
The next stage is a manual technical assessment followed by an HR interview, described on Fortinet's candidate community forum.
The role checks basic knowledge, problem-solving, and user management.
Why the Wait Can Stretch Past Three Weeks
No primary source gives a Fortinet OA-to-decision interval, so I stopped expecting a fixed reply date. The one concrete number is three weeks of silence from a backend candidate.
The Fortinet HackerRank OA Changes Shape by Role
There is no single Fortinet HackerRank OA, because the shape changes with the role you applied for. Below, the chart sets the confirmed role-scoped versions side by side.

Four Role Tracks, Four Different OA Shapes
The dated reports show structurally different assessments per track, not one fixed Fortinet test.
Why This Changes Where You Spend Prep Time
Role and req decide where the prep goes. The new-grad SWE evidence points to algorithmic problems, while SQL and networking belong to the other tracks. I put my seven days against the algorithmic shapes for that reason.
FAQ
Does Fortinet use HackerRank for the SWE online assessment?
Yes. Fortinet's own community forum names HackerRank as the platform, and several candidate accounts agree.
How many questions are on the Fortinet HackerRank OA?
Not confirmed for the 2026 new-grad SWE track. Every hard number I found was role-specific or dated, so the count moves with the role.
Is the Fortinet HackerRank OA proctored?
HackerRank supports several integrity modes plus always-on paste and tab tracking. Which mode Fortinet enables is not public.
Can I use an AI tool or invisible app during the Fortinet HackerRank OA?
Desktop overlay tools put the AI's answer on your computer screen. The window hides above the browser with a basic OS-layer trick, but the answer is still on-screen. Proctoring software keeps adding detection, so that exposure never fully closes.
InterviewFox pushes the answer to your phone instead, a separate device no screenshot or recording can reach. If you plan to use AI assistance during the OA, the dual-device architecture takes the answer off your screen.
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
What happens if I do badly on the OA?
It is not always make-or-break. One candidate advanced to a manual assessment despite a weak OA.
How long do I have to finish the OA?
The timer is recruiter-set and shown in your invite. The link can also carry a recruiter-set expiry date.