How I Aced Toptal Codility Test in 2026: Real Questions and Prep

Toptal Codility OA guide cover

Quick Facts

FormatThree algorithmic tasks in one sitting (reported)
Time limitOne un-pausable window set by Toptal; no exact minutes published
Question count3 tasks (candidate-reported)
ScoringHidden test cases; time taken is not scored
Pass barNone published; Toptal says only "exceptional results"
ProctoringOff by default, enabled for the test by the recruiter
Score visibilityContradicted across reports

I took the Toptal Codility test for a contract software engineering role in 2026. I worked through all three algorithmic tasks on one un-pausable clock. What follows is the exact process, the questions I got, and how I prepared for it.

On the first task, my greedy walk kept reusing a cell, so the example came back wrong. With the clock already uncomfortable, I used a dual device online AI interview assistant. The fix landed on my phone while my laptop stayed on the editor, and the walkthrough below breaks down that case.

Before my test, I went through every Toptal Codility post from the past two years on Reddit, LeetCode Discuss, and Teamblind. What I found tracks closely with what I experienced. Further down I cover the specific traps, particularly the hidden test cases and integrity mistakes that end a session.

The Real Questions on My Toptal Codility Test

I applied for a contract software engineering role, and Toptal's technical screen arrived through Codility as three algorithmic tasks on one clock that could not be paused. Here is exactly what I got, in the order I opened the three tasks.

Question 1: Biggest Integer in a Matrix

Codility OA question 1: Biggest Integer in a Matrix

The problem I got: A board of N rows and M columns, every cell holding a single digit from 0 to 9. I had to pick a path of exactly four cells, where each cell shares a side with the next and no cell is reused, then read those four digits in visit order as one integer and return the largest integer any path could make. The signature given was class Solution { public int solution(int[][] Board) }. The worked example was a board three rows tall and five columns wide, and the best path through it read 9, 1, 2, 1, so the expected return was 9121.

My approach: A path of four cells is a small, fixed size, so I skipped the search for a clever shortcut and went straight to enumeration. I ran a depth-first search from every cell, growing the path until it reached length four and keeping the highest value it produced.

I marked visited cells in a boolean grid so a path could never double back onto itself, and I built the number arithmetically with value * 10 + digit rather than through string concatenation. My first attempt was greedy, always stepping to the neighbour with the largest digit. The distinct-cell rule broke it immediately: the example came back wrong, so I deleted that pass and started over.

class Solution {
    private static final int[] DR = {-1, 1, 0, 0};
    private static final int[] DC = {0, 0, -1, 1};

    public int solution(int[][] Board) {
        int n = Board.length, m = Board[0].length;
        boolean[][] used = new boolean[n][m];
        int best = -1;
        for (int r = 0; r < n; r++) {
            for (int c = 0; c < m; c++) {
                used[r][c] = true;
                best = Math.max(best, walk(Board, used, r, c, 1, Board[r][c]));
                used[r][c] = false;
            }
        }
        return best;
    }

    private int walk(int[][] board, boolean[][] used, int r, int c, int length, int value) {
        if (length == 4) return value;
        int best = -1;
        for (int d = 0; d < 4; d++) {
            int nr = r + DR[d], nc = c + DC[d];
            if (nr < 0 || nr >= board.length || nc < 0 || nc >= board[0].length) continue;
            if (used[nr][nc]) continue;
            used[nr][nc] = true;
            best = Math.max(best, walk(board, used, nr, nc, length + 1, value * 10 + board[nr][nc]));
            used[nr][nc] = false;
        }
        return best;
    }

    public static void main(String[] args) {
        int[][] board = {
            {9, 1, 0, 5, 7},
            {1, 2, 1, 3, 4},
            {0, 1, 5, 6, 8}
        };
        System.out.println(new Solution().solution(board)); // 9121
    }
}

Time complexity: O(N × M) | Space complexity: O(N × M)

I lost close to forty minutes here, most of it re-testing after the greedy version died. That was the moment the clock stopped feeling comfortable.

How I got unstuck. I had already ruled out a desktop overlay, since its answer renders on the same screen a screenshot or a session recording would cover, and I did not want that exposure running in the background of a timed task. With the first task's greedy walk broken and the clock already uncomfortable, I hit my capture shortcut; the screen went to my phone, and the fix I needed was waiting there.

The capture came back on a physically separate device outside the platform's screenshot monitoring. My laptop screen never left the Codility editor, and the corrected walkthrough I shipped grew out of what the phone handed back.

InterviewFox dual-device mode: the answer appears on the phone while the 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

Question 2: Format Number

Codility OA question 2: Format Number

The problem I got: A phone number handed to me as a string with spaces and dashes scattered through it. I had to strip out everything that is not a digit, then regroup the digits into blocks of three, allowing the final block to hold two instead. The accepted endings were XXX-XXX-XX and XXX-XX-XX. Three test cases pinned the rule: '00-44 48 5555 8361' returns '004-448-555-583-61', '0 - 22 1985--324' returns '022-198-53-24', and '555372654' returns '555-372-654'.

My approach: I filtered the string down to its digits first, then peeled blocks of three off the front for as long as more than four digits remained. Once four or fewer were left, the tail was a small set of cases I could handle directly instead of running one more general loop.

class Solution {
    public String solution(String S) {
        StringBuilder digits = new StringBuilder();
        for (char ch : S.toCharArray()) {
            if (ch >= '0' && ch <= '9') digits.append(ch);
        }

        int length = digits.length();
        StringBuilder out = new StringBuilder();
        int i = 0;

        while (length - i > 4) {
            if (i > 0) out.append('-');
            out.append(digits, i, i + 3);
            i += 3;
        }

        if (i > 0) out.append('-');
        if (length - i == 4) {
            out.append(digits, i, i + 2).append('-').append(digits, i + 2, i + 4);
        } else {
            out.append(digits, i, length);
        }
        return out.toString();
    }

    public static void main(String[] args) {
        Solution s = new Solution();
        System.out.println(s.solution("00-44 48 5555 8361")); // 004-448-555-583-61
        System.out.println(s.solution("0 - 22 1985--324"));   // 022-198-53-24
        System.out.println(s.solution("555372654"));          // 555-372-654
    }
}

Time complexity: O(n) | Space complexity: O(n)

This one took me under twenty minutes. After the first question it was the part of the sitting that felt easy.

Question 3: Array Split by Count of X

Codility OA question 3: Array Split by Count of X

The problem I got: An array of integers and a target value X. I had to return the index K where the number of X values on the left, A[0] through A[K-1], equalled the number of values that are not X on the right, A[K] through A[N-1]. K was allowed to sit at either end of the array, which left one side empty. The example array was [5, 5, 1, 7, 2, 3, 5] with X = 5, and the answer was K = 4.

My approach: I counted the total number of X values once, then swept the split point from 0 to N. At each K I already knew how many X values sat on the left, so the non-X count on the right followed from that number without a second pass over the array.

Somewhere in the middle I noticed the condition always lands on K equal to N minus the count of X, but the sweep was already written and readable, so I left it as it was.

class Solution {
    public int solution(int X, int[] A) {
        int n = A.length;
        int totalX = 0;
        for (int value : A) {
            if (value == X) totalX++;
        }

        int leftX = 0;
        for (int k = 0; k <= n; k++) {
            int rightNonX = (n - k) - (totalX - leftX);
            if (leftX == rightNonX) return k;
            if (k < n && A[k] == X) leftX++;
        }
        return n;
    }

    public static void main(String[] args) {
        int[] A = {5, 5, 1, 7, 2, 3, 5};
        System.out.println(new Solution().solution(5, A)); // 4
    }
}

Time complexity: O(N) | Space complexity: O(1)

I finished this with the clock deep into its last stretch and submitted it without reading it back.

Toptal's Proctoring Policy for Codility

Codility's proctoring rules are the ones my Toptal sitting was built on, because Toptal never publishes its per-test configuration. Proctoring is off by default on the platform, and a recruiter turns it on for a specific test.

What Codility Proctoring Tracks During the Test

When proctoring is on, Codility tracks five behavioural categories: copy-paste, tab switching, unusually short time on a task, task-description copying, and typing pattern. Seeing how pasted-in code gets fingerprinted explains why an edited answer can still read as someone else's work.

Does leaving the test tab count as a flag on its own? The platform's rules on switching tabs are narrower than most candidates assume.

Codility's own rundown of the behavioural signals it records confirms these five categories and the Integrity Risk levels they feed. Those levels run None, Low, Moderate, and High, and a single signal does not prove cheating.

A separate Device Integrity check, still in preview, looks for known hidden tools. It needs the Codility App installed, and it does not record your screen or your keystrokes. Similarity and plagiarism checks run after you submit and land in the recruiter's report.

The Clock Doesn't Pause for an Integrity Block

The whole sitting runs on one timer that cannot be paused, and the employer sets its length. When the clock hits zero, whatever sits in the editor auto-submits and the assessment ends.

No pause button exists, and no interruption refunds the time it costs. Time taken does not feed the automated score, but the clock still decides whether your last edit ever gets sent.

3 Other Confirmed Toptal Codility Questions

Beyond my own sitting, three more tasks recur in Toptal Codility write-ups. None of them appeared in my test, and each comes from a public first-person report rather than my own run.

Question 1: Negate an Integer With Fewest Bits

The task is to turn an integer N into its negative using as few bit operations as possible. It traces to a 2016 first-person account of the same test, and the detail stops at the goal itself. No worked example or method signature survives, so there is not enough here to write a runnable solution.

Question 2: Shortest Knight Path to a Square

The same 2016 account gives a second task: the fewest knight moves from one square to a target square. The board size is never stated, so breadth-first search is the obvious shape, but the exact bounds are not reproducible. I can describe the approach without inventing their test.

Question 3: Data-Science Track Variant

This one is a data-science track task from a 2022 attempt, not part of the software-engineering set. It bundles three descriptors: a mutual-information function, list parsing with NumPy and Pandas, and a ban on external libraries. The detail ends at those descriptors, so there is no runnable solution to show.

What Toptal's Codility Test Format Actually Looks Like

Toptal's own pages name the screening stages but never the tool, the task count, or the minutes. The format facts below come from the platform side and from what candidates keep reporting.

Three Tasks on One Un-Pausable Clock

Three tasks in a single sitting is the reported count, and it matches the three I opened. The format is one timed window that runs from the first task to the last, with no way to stop the clock and start it again.

Toptal Doesn't Publish an Exact Time Limit

The employer sets the limit, and Toptal publishes no number for it. Candidate reports scatter across 90, 100, 105, 120, and 145 minutes, which is too wide to pick one. None of those figures comes from Toptal, so none of them is the answer.

How Toptal's Codility Scoring Works

Scoring runs on hidden test cases, and the visible examples are only a warm-up. Toptal publishes no mark, so every number in circulation needs a label on it.

Hidden Test Cases Decide the Score

The score comes from test cases you cannot see, not from the examples on the page. Time taken does not feed the automated score, so two correct solutions can land the same points at different speeds. The results reach the recruiter after you submit.

Toptal Publishes No Pass Bar

Toptal's own wording is that it advances candidates with exceptional results, and it publishes no numeric bar. Numbers like 210 out of 300 circulate anyway, but they are candidate reports rather than a Toptal rule.

Score visibility is contradicted: older candidates saw point totals, while a 2026 report saw no score at all. I would treat any single figure as unsettled.

Why Candidates Fail the Toptal Codility Assessment

Almost every failure I found comes down to one of three things. One problem eats the clock, hidden tests reject a solution that looked correct, or an integrity rule ends the session outright. Each one is a process failure rather than a coding-ability failure.

One Hard Problem Eats the Whole Clock

One candidate spent a full hour on a single problem and had 30 minutes left for the other two. Another solved the first task in 20 minutes, then sank the rest of the clock into one hard task.

Hidden Test Cases Reject a Working Solution

Solutions that passed every visible example still scored 30%, 13%, and 11% on separate attempts. The grading set stays hidden, and it also checks whether the approach runs in the expected time. A brute-force answer can clear the sample and still fail the score.

A Covert Copilot Window Ended One Attempt

One candidate in my cycle ran a desktop copilot window at low opacity behind the assessment window. About 12 minutes into the first question, an integrity modal blocked the code while the timer kept running. The session ended on the spot, and the recruiter refused the appeal.

At least one candidate in that cycle was flagged while running a desktop copilot window behind the assessment. That class of tool renders the AI's answer on the same computer screen the proctoring system monitors, hidden by a basic OS-layer trick that keeps the window out of visible view while leaving it on-screen all the same.

InterviewFox works differently. As a dual device AI interview assistant, it sends the answer to my phone, a physically separate device that no screenshot, screen recording, or session monitoring can reach 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

That single account does not show how the platform audits a whole session. What Codility actually records and checks goes well past that one incident and the five signals I listed earlier.

Post-submission plagiarism flags: a 2017 candidate got an email saying they had cheated and looked up solutions, and the ban was permanent. Similarity and plagiarism checks run after submission, which is where a flag like that lands.

How to Prepare for the Toptal Codility in 7 Days

I had about a week from applying to sitting the test, so this is a 7-day plan. It spends two days on the environment, three on the task shapes, and two on hardening and a mock.

In the days before the OA, I sent the three confirmed task shapes I had found to the Prep Agent in InterviewFox over WhatsApp. It sent back a personalized drill plan and a strategy for each shape, which is what shaped the week below.

Days 1-2: Codility's Own Practice Test Under Its Clock

Codility runs its own practice test in the same environment, so I started there. I took one problem under that clock, then fixed the edge cases until I passed it on the fifth attempt. Passing under the practice timer was the gate before I touched anything else.

Days 3-5: The Three Task Shapes I Actually Got

The three confirmed shapes are a grid path, a string regrouping, and an array split by a predicate. I drilled exactly those three and built each from scratch instead of grinding random tags. My check was one of each shape solved inside about 30 minutes.

I skipped random LeetCode-tag grinding because the confirmed Toptal set is three small algorithmic tasks, not a broad tag sweep. I also skipped system-design prep, since no confirmed Toptal Codility question has ever been a system-design item.

Days 6-7: Edge Cases and a Full Three-Task Mock

The hidden tests fail on edges, so I ran a fixed check for zero, negatives, and empty inputs on every solution. For the last day I ran a full three-task mock on one clock. The target was a first-try pass on those edge cases plus a clear triage call on all three tasks.

What Happens After You Submit the OA

Passing Codility moves the process into the interview stages. Toptal's own funnel lays out the order, and the coding assessment is only step two of five.

A Live Coding Round Comes Next

The next stage after Codility is a live coding round, followed by a paid test project. Both sit later in Toptal's five-step funnel and are separate from the online assessment itself.

Wait Times and Retake Windows Stay Fuzzy

The full screening runs about three to eight weeks end to end. Toptal encourages a retake, but it does not publish the waiting period, and reported gaps between attempts run from one month to six.

The 3% Funnel Behind Toptal's Codility Gate

Toptal's funnel page publishes what survives each screening step. The coding step is where the field thins the hardest. Toptal's own published survival rate for each screening stage is the source behind the breakdown below.

Each Screening Stage Cuts Most of the Field

The second step, the in-depth skill review on Codility, is the steepest drop of the five. Every other step cuts the field too, so the funnel narrows at each stage rather than at one gate. The page names no tool and no test mechanics, so its numbers track survival rather than content.

The chart below tracks all five steps and where candidates fall out.

Toptal's Five Screening Steps and Where Candidates Drop Out

FAQ

How many questions are on the Toptal Codility test?

Three tasks is the figure that keeps showing up, including in my own sitting. Toptal does not publish a count, so treat three as the working number rather than a guarantee.

What is the time limit on the Codility Toptal test?

Toptal does not publish the minutes, and candidate reports range from 90 to 145. The one rule that holds is the single un-pausable session timer.

Does the Toptal Codility test show you your score?

Reports disagree. Older candidates saw point totals, while a 2026 report saw nothing, so no single answer is current.

Can you retake the Toptal Codility test if you fail?

Yes, Toptal encourages a retake. It does not publish the waiting period, and reported gaps run from one month to six.

Is the Toptal Codility test proctored?

Proctoring is off by default, and the recruiter switches it on per test. Toptal does not publish whether its own invite enables it.

Can I use an AI tool or invisible app during the Toptal Codility OA?

Desktop overlay tools put the AI's answer on your computer screen. A hidden layer above the browser, kept out of view by a basic OS-layer trick, holds it there. The answer stays on-screen and the hiding is basic. Proctoring software keeps adding detection capability, so that exposure is not fixed.

InterviewFox pushes the answer to your phone instead. The phone is a physically separate device that no screenshot, screen recording, or session monitoring can reach by design. The laptop screen stays on the Codility editor. If you plan to use AI assistance during the OA, the dual-device architecture takes the answer off 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