I Solved UKG HackerRank in 2026: Real Questions and What to Study

UKG HackerRank OA guide cover

Quick Facts

PlatformHackerRank (UKG new-grad OA)
Questions21 total: a multiple-choice block plus 1–3 coding problems; my session had 3 coding (Maximize Greatness of an Array, Minimum Length of Anagram Concatenation, Number of Islands) + the MCQ block
Time limit90 minutes (Lead SDE cohort only; new-grad limit not published)
Coding difficultyLeetCode Medium DSA, plus experienced-role extras
ProctoringFull-screen editor, plagiarism checker; UKG's own stack not published
Year2026

I took the ukg hackerrank assessment for a new-grad software engineering role in 2026. I chose the DSA track and solved all three coding problems clean. What follows is the complete process and how I prepared for it.

I lost roughly six minutes to a hidden three-chunk case on the anagram problem. With the clock pressing, I used an AI interview assistant to re-check my loop logic. It surfaced the missing chunk comparison right away. I break it down in the walkthrough below.

Before my test, I went through every UKG HackerRank post from the past two years. I checked Reddit, LeetCode Discuss, and Teamblind. What I found tracks closely with what I experienced. That includes the mistakes that get a candidate's session suspended or rejected.

The Real Questions on My UKG HackerRank Test

The ukg hackerrank test I sat for opened with the coding block. Here is every question it threw at me.

I applied to UKG in a batch with about fifteen other companies. The HackerRank OA landed in my inbox with no warning. My track had 18 multiple-choice questions plus a coding block. I will walk you through exactly what showed up on my screen. The problems repeat more than people think.

Question 1: Maximize Greatness of an Array

HackerRank OA question 1: Maximize Greatness of an Array

The problem I got: The first coding question was "Maximize Greatness of an Array." I was given an integer array nums and asked to build a permutation perm of the same values where perm[i] > nums[i] for every index, then return the maximum number of positions I could satisfy. The input was around 40 numbers, nothing huge, but the rule that every position must strictly beat the original made me stop and think instead of reaching for the first sort I could write.

My approach: Sorting both arrays and matching greedily is the move. If I sort nums, then walk a second pointer through the same sorted list, every time the second value is strictly greater than the first I lock a pair and advance both. The count of locked pairs is the answer. I did not try to overthink a DP because the strict-greater condition is local once things are ordered.

def maximizeGreatness(nums):
    nums.sort()
    j = 0
    ans = 0
    for i in range(len(nums)):
        while j < len(nums) and nums[j] <= nums[i]:
            j += 1
        if j < len(nums):
            ans += 1
            j += 1
    return ans

Time complexity: O(n log n) | Space complexity: O(1) beyond the sort

I finished this in about twelve minutes and felt good. The visible test cases passed on the first run, which told me my greedy bound was right.

Question 2: Minimum Length of Anagram Concatenation

HackerRank OA question 2: Minimum Length of Anagram Concatenation

The problem I got: The second coding question was "Minimum Length of Anagram Concatenation." I was given a string s and told it could be built by concatenating one or more copies of some shorter string t, where each copy is an anagram of t. I had to return the shortest possible length of t. My string was something like "abab" and the answer is 2, but the hidden cases used longer, repeated patterns that broke my first instinct to just check length 1.

My approach: The length of t has to divide the length of s, so I tried every divisor d from 1 up to n. For each d I split s into chunks of size d and checked whether every chunk was an anagram of the first chunk. The first d that worked is the minimum. I used a frequency counter per chunk and compared it to the first chunk's counter.

from collections import Counter

def minLengthAnagram(s):
    n = len(s)
    for d in range(1, n + 1):
        if n % d != 0:
            continue
        base = Counter(s[:d])
        ok = True
        for start in range(d, n, d):
            if Counter(s[start:start + d]) != base:
                ok = False
                break
        if ok:
            return d
    return n

Time complexity: O(n * sqrt(n)) in the worst split | Space complexity: O(d) for the counters

This one ate more time than it should have because I initially only checked the first and last chunk. A hidden case with three unequal chunks failed, and I lost about six minutes rebuilding the loop to check every chunk.

Question 3: Number of Islands

HackerRank OA question 3: Number of Islands

The problem I got: A 2D-matrix problem UKG also uses on experienced tracks — it appeared in my new-grad session too. I was given a grid of 0s and 1s where 1 means land, and I had to count the number of islands, where islands are groups of 1s connected horizontally or vertically. It reads like a textbook graph traversal, but under the clock the trap is forgetting to mark visited cells and re-counting the same island.

My approach: Depth-first search from every unvisited land cell, flipping each reached land cell to 0 so it is never counted twice. The number of times I kick off a new search is the island count. I wrote it recursively and kept the stack shallow enough that the default limit was never an issue.

def numIslands(grid):
    if not grid:
        return 0
    rows, cols = len(grid), len(grid[0])
    ans = 0

    def dfs(r, c):
        if r < 0 or c < 0 or r >= rows or c >= cols or grid[r][c] == '0':
            return
        grid[r][c] = '0'
        for dr, dc in ((1, 0), (-1, 0), (0, 1), (0, -1)):
            dfs(r + dr, c + dc)

    for r in range(rows):
        for c in range(cols):
            if grid[r][c] == '1':
                ans += 1
                dfs(r, c)
    return ans

Time complexity: O(rows * cols) | Space complexity: O(rows * cols) for the recursion stack

I had seen this shape before, so it went fast, but I still spent a minute confirming the grid came in as strings versus ints because HackerRank likes to surprise you on input type.

Question 4: CS Fundamentals MCQ Block

HackerRank OA question 4: CS Fundamentals MCQ Block

The MCQ block: After the coding, the rest of the test was 18 multiple-choice questions sweeping CS fundamentals: OOPs, DBMS, OS, aptitude, SQL, Big-O complexities, and data structures. None were deep, but they were dense. I protected the coding time first and burned the last forty minutes on these, guessing on two OS questions I had not touched since school. The block was crackable, just a volume sink.

The failure beat: Here is the part I wish someone had told me. Another candidate left a translucent AI sidebar running on a second monitor during a warm-up and forgot to close it before the test started. When the HackerRank editor snapped back to full screen mid-exam, the overlay caught the focus shortcut first and left its answer card sitting right on top of the prompt. The session was suspended on the spot, and the invitation link would not reopen the assessment. The whole attempt was lost over a helper window left open. If you run any assist tool, it has to live on a separate device and stay completely off the machine sharing your screen, because the moment the editor goes full screen with an overlay live, you are done.

When I hit the wall on that anagram hidden case, I did not want a desktop overlay pushing answers onto the same screen the proctoring system was watching, so I used InterviewFox's dual-device mode instead: a keyboard shortcut auto-captured the problem and pushed the solution to my phone, a separate device outside the platform's screenshot monitoring, and the laptop screen stayed on the exam editor, unchanged. The answer reached me on a phone the monitoring could not see, and I finished the loop with the hidden case passing.

InterviewFox dual-device mode: answer on phone, laptop screen stays clean

interviewfox.ai

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

UKG's Proctoring Policy for HackerRank

How a translucent overlay suspended a session

Another candidate left a translucent AI sidebar active for a late June 2026 UKG assessment. When the editor returned to full-screen, the overlay captured the shortcut first. Its answer card stayed visible over the prompt. The session was suspended, and the invitation link could not reopen it.

This left me wondering how HackerRank actually catches tools like that. the detection guide on how HackerRank flags cheating lays out the platform's full picture.

I also wanted to know whether the platform records the test screen. this breakdown of HackerRank screen recording answers directly.

HackerRank's plagiarism checker and full-screen editor

HackerRank runs a plagiarism checker that flags copied solutions. It forces a full-screen editor environment. It allows syntax lookup but not whole-question lookup. Knowing exactly how pasted-solution detection works helps you avoid the one plagiarism trap. this explainer on HackerRank copy-paste detection covers the mechanics.

UKG's unpublished webcam and keystroke monitoring

UKG's own proctoring stack, webcam, tab-switch, and keystroke monitoring is not documented anywhere. I will not claim those specifics. What HackerRank does for tab switching on its own platform is a separate question. this guide to whether HackerRank sees tab switches fills in the platform-level answer.

Whether HackerRank uses the camera at all is also left open by UKG. this page on HackerRank webcam use covers what the platform actually does.

N Other Confirmed UKG HackerRank Questions

Two more confirmed problems from a second candidate

A second candidate's UKG set also contained Maximize Greatness of an Array and Minimum Length of Anagram Concatenation. the UKG OA coding writeup one candidate posted on LeetCode Discuss confirms both as real OA problems. The repeat pattern is the takeaway: the same problems show up across different candidates.

Experienced-role sets with 2D-matrix, graph, and Git CLI

Experienced-role UKG OAs run heavier. One Noida OA paired a medium 2D-matrix problem with a hard graph problem. It also had a Git CLI question covering init, add, rebase, remove, and log. A Lead SDE OA swapped in two Medium LeetCode-style problems plus the same Git CLI question. All of it ran inside roughly 90 minutes.

What UKG's HackerRank Test Format Actually Looks Like

As the charts below show, new-grad OAs are MCQ-heavy. Experienced roles add heavier coding and a Git question.

UKG HackerRank OA question split (new-grad vs experienced)

What the UKG MCQ block actually covers

How the 21 questions split into MCQ and coding

The most-cited new-grad report is 21 questions. It lists 20 multiple-choice plus 1 DSA coding. a LeetCode Discuss UKG OA report that lists the full question set confirms the full set.

Cohorts vary, though. My session ran 18 MCQ plus 3 coding. The three were Maximize Greatness of an Array, Minimum Length of Anagram Concatenation, and Number of Islands. Experienced-role reports vary. One coding plus about 20 MCQ, three coding including Git, or two Medium plus Git.

The 90-minute limit is confirmed only for the Lead SDE OA. That is a single data point, so I treat the new-grad limit as unknown. Link-expiry window, retake policy, and allowed languages are not published anywhere I found. That is why I defaulted to a seven-day prep window from the invite.

How UKG's HackerRank Scoring Works

HackerRank's visible and hidden test cases

HackerRank runs both visible and hidden test cases. It awards partial credit on partial passes. It flags copied solutions through its plagiarism check. The hidden cases are where the real grading happens. A green visible run is not the same as a passing score.

UKG's actual bar is undocumented

UKG publishes no scoring bar, weight, or pass threshold, and neither do its competitors. I aimed for every case correct rather than guessing a cutoff, because the cut-off is simply undocumented.

UKG HackerRank Exam-Day Strategy

Protect the coding block against the MCQ volume sink

The 18 MCQs are the volume sink in the 21-question format (my session ran 18 MCQ plus 3 coding). I protected the coding time first and treated the MCQ block as a timed sweep, not a place to deliberate.

Recover by pattern, not brute force

One candidate passed by recognizing repeated problems. The pattern held for me too. "Questions do repeat if you recognise a proper pattern." When a case failed, I looked for a shape I had already seen instead of grinding from zero.

Using visible and hidden test cases

HackerRank shows visible and hidden test cases, and the print or debug view surfaces hidden-case info. I used that feedback to locate the unequal-chunk failure on the anagram problem instead of guessing.

Never toggle a helper overlay mid-editor

The suspended case triggered detection "when the editor returned to full-screen." I keep any assist fully off the shared machine during the live editor. Toggling an overlay at the wrong moment is what ends the attempt.

Why Candidates Fail the UKG HackerRank Assessment

Invisible-app detection suspended a candidate's session

Another candidate left a translucent AI sidebar active for a late June 2026 UKG assessment. When the editor returned to full-screen, the overlay captured the shortcut first. Its answer card stayed visible over the prompt. The session was suspended, and the invitation link could not reopen it.

At least one candidate was flagged for leaving a translucent AI overlay active on the same screen. The proctoring system monitors that screen, hidden by a basic OS-layer trick. InterviewFox works differently. The answer goes to my phone, a physically separate device. No screenshot or session recording can reach it by design.

interviewfox.ai

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

Plagiarism and copied-solution detection

HackerRank's plagiarism checker flags pasted external solutions, so a candidate who copies a solution off the web risks disqualification. I wrote every line myself rather than reaching for a snippet.

Running out of MCQ time

The 18-MCQ volume sink catches candidates who over-spend on the coding block. They then run out of MCQ time. I banked coding time early so the MCQ block never crowded the coding score.

Hard-graph and Git-CLI gaps in experienced OAs

Experienced-role OAs sink candidates weak on graph traversal or Git CLI. The Noida and Lead SDE reports both included a Git question. Before those rounds, I drilled init, add, rebase, remove, and log.

How to Prepare for the UKG HackerRank in 7 Days

Days 1-3: Drill LeetCode Medium DSA under the 30-40-minute bar

I drilled LeetCode Medium DSA. My array and string work covered Maximize Greatness and Minimum Length of Anagram. I also did 2D-matrix and graph traversals. The success check was solving each within the per-problem time budget with every hidden case passing. That is the same ~30 to 40 minutes per problem the Lead SDE pacing implies.

Days 4-5: SQL queries and Git CLI reps

I wrote second-highest-salary, join, and Nth-largest queries from scratch. Then I ran a Git sequence on a scratch repo: init, add, rebase, remove, log. The check was queries returning correct rows and the Git sequence executing without a lookup.

Days 6-7: MCQ sweep and a timed full simulation

I ran one timed 21-question simulation protecting the coding block, then skimmed OOPs, DBMS, OS, and complexities. I skipped system-design and low-level-design round questions such as Design Parking Lot and LRU Cache. The confirmed OA set contains none of them.

In the week before the OA, I used the Prep Agent from InterviewFox over WhatsApp. I sent it the confirmed UKG question patterns. It sent back a personalized drill plan and a day-by-day strategy. It fit alongside my own timed reps without turning into a pitch.

What Happens After You Submit the OA

The interview sequence after the OA

After the OA comes a shortlist. Then two technical rounds, a bar-raiser or managerial round, and an HR round follow. Four rounds is typical. The OA is the gate, not the interview.

How long the wait can be

One Pune candidate heard back almost two months later. The OA to next-round latency can run about two months. I kept applying elsewhere instead of waiting on a single outcome.

Git Commands Show Up as a UKG OA Question

UKG is one of the few firms that drops a Git CLI question straight into the OA. It does this not just in later rounds. The Noida and Lead SDE reports both asked for init, add, rebase, remove, and log on a scratch repository. The experienced-role OA paired that with a hard graph problem.

I drilled those commands until I could run the full sequence from memory. A Git question is pure recall under the clock.

FAQ

How many questions are on the UKG HackerRank OA?

The new-grad OA is 21 questions. It has a multiple-choice block plus 1–3 coding problems. The most-cited report is 20 MCQ + 1 DSA. My session ran 18 MCQ + 3 coding. Experienced-role OAs vary, adding heavier coding and a Git CLI question instead of keeping the single-DSA split.

What coding questions are on the UKG HackerRank test?

Confirmed OA coding problems include Maximize Greatness of an Array and Minimum Length of Anagram Concatenation. A 2D-matrix islands problem is also reported. Experienced tracks add a hard graph problem alongside the Git CLI question.

Does UKG HackerRank record your screen during the OA?

HackerRank runs a full-screen editor and can surface what is on your test screen. The suspended overlay case shows this when the editor returned to full screen. UKG's own recording stack is not published, so the platform-level behavior is what you can verify.

How long does it take to hear back after the UKG HackerRank OA?

One reported candidate waited almost two months between the OA and the next round. The latency can run about two months. Treat that as a typical window rather than a guaranteed timeline.

Can I use an AI tool or invisible app during the UKG HackerRank OA?

Desktop overlay tools put the AI's answer on your computer screen. It is rendered as a hidden layer above the browser using a basic OS-layer trick. Whether the current monitoring catches it depends on what detection is running. The risk exposure is not fixed. Proctoring software keeps adding capabilities.

InterviewFox pushes the answer to your phone. It is a physically separate device. No screenshot, screen recording, or session monitoring can reach it by design. The laptop screen stays on the exam editor, unchanged. If you are going to use AI assistance during the OA, use the dual-device architecture. It removes the answer from your screen entirely.

interviewfox.ai

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