Guides · Coding assessment platforms

Codility similarity check: what actually triggers a flag

2026 · ~6 min read · OfferPilot AI

A similarity flag is a resemblance score, not a verdict. Your code is normalised first, with comments dropped, formatting collapsed and identifiers stripped of their names, then compared against a large body of earlier submissions to the same task and against solutions that circulate publicly. Short canonical algorithms collide constantly, because there are only a handful of correct ways to write a binary search. A flag starts a conversation, and the conversation is usually winnable in four sentences.

What the check compares your submission against

Three pools, all of them larger than candidates assume.

  • Prior submissions to the same task. Assessment tasks are reused across many hiring companies over years. Your comparison pool is not the eleven other people in this batch, it is everyone ever given that task on the platform.
  • Publicly available solutions. Task statements get pasted into forums, gists and public repositories, usually with an answer attached. Anything indexable is a candidate, including code written years before your test opened.
  • The shapes typical of generated answers. A model given a well-specified prompt is strikingly consistent: the same helper decomposition, the same guard clause, the same comment cadence, the same naming register. Everyone prompting it with the same task statement receives near-siblings.

What gets compared is not the characters you typed. Any similarity system worth running canonicalises before it measures: comments removed, whitespace collapsed, identifiers replaced by positional placeholders, and in stronger implementations the code parsed down to a structural fingerprint of its control flow. Renaming left to lo, reordering independent statements, swapping a for loop for a while loop: none of it moves the needle. Two programs a human would call the same algorithm score as the same algorithm.

Codility does not publish its matching algorithm or its thresholds, so treat precise claims about them with suspicion, the exact triggering percentage included. The normalise-then-compare shape is standard across the field and safe to reason from. The numbers are not.

Why a textbook binary search flags with no misconduct involved

Write out the real degrees of freedom in a correct iterative binary search returning an index or a sentinel.

  • The loop condition: while lo <= hi, or while lo < hi with a check afterwards.
  • The midpoint: (lo + hi) // 2 or lo + (hi - lo) // 2, identical where integers cannot overflow.
  • The comparison order: equality first, or the ordering test first with equality falling through.
  • The failure return: -1, a null value, or the insertion point.
  • The names: lo and hi, left and right, l and r, start and end.

Multiply the genuine choices and you get between eight and thirty distinct programs. Now delete the last bullet, because normalisation deletes it for you. What remains is about a dozen shapes shared by everyone who has ever solved that task correctly. Collision there is not a risk, it is the expected outcome.

Sliding window behaves the same way: advance the right edge, update the counter, shrink from the left while the window is invalid, record the best. That skeleton is what survives normalisation, and so does a hash map frequency count.

Task shapeRoom the solution hasWhat a high match means
Binary search or two pointers on sorted inputNone, the structure is forcedNear zero information, expect a match
Sliding window with a counterVery littleWeak signal at best
Frequency map, then sort or selectAlmost noneNear zero information
BFS or DFS over a gridTraversal standard, bookkeeping variesMild, unless the bookkeeping matches too
Classic DP with a known recurrenceSome, in table layout and rolling arraysMild
Multi-rule simulation, fiddly edge casesDozens of valid structuresStrong, worth a careful read
A non-obvious trick forced by an odd constraintModerateStrong if it matches line for line

Say that asymmetry out loud if you are asked. A high match on a binary search means almost nothing. The same number on a simulation with seven business rules means a great deal, because a thousand ways to write it existed and two people picked the same one.

What the recruiter sees on their end

The result lands inside the candidate report, beside the score and the code playback rather than instead of them. In general terms, since layout varies by plan and by how the company configured the assessment:

  • A per-task result, not a per-candidate one. Task two can flag while tasks one and three sit clean.
  • A degree of resemblance, shown as a score or a band, not a yes or no, usually with a way to see what it matched side by side.
  • The playback that replays your solution being written, the timing, and the focus and paste signals if that company switched them on.

Nothing in it uses the word cheating. It reports resemblance and leaves the judgement to a person. An engineer who opens the detail, sees a binary search and scrubs the playback to watch you type it closes the flag in ninety seconds. A coordinator working through forty reports who sees a coloured badge may open nothing. You cannot pick which of the two gets your report, which is why being asked at all is the good outcome. The ones never asked are filtered in silence.

What to say when a hiring manager raises it

Four rules, then the words.

Keep it to a few sentences

Length reads as anxiety. A short paragraph settles this. A page of justification invites a second look.

Name the algorithm first

Anyone who wrote the code can say what it is in three words without hedging. Lead with that.

Explain the mechanism, do not plead

"Standard algorithm, few valid forms, they all normalise to one shape" is checkable. "I promise I did not cheat" is not.

Offer the resolution once

A live variant, or a walk-through on a call. Say it plainly, then stop. Repeating the offer undoes it.

Thanks for asking directly, I would much rather answer it. Task two is a standard iterative binary search and I wrote it during the session. There are only a few correct ways to write one, so once names and formatting are normalised most correct submissions look alike. Happy to walk through mine, or to take a variant live on a call, whichever suits.

Swap the second sentence for your actual task and leave the rest alone. If you consulted documentation on an assessment that allowed it, say so in one clause: "I looked up the bisect signature in the docs" removes the only detail that could later look concealed.

If the flag is fair, none of that applies. When you submitted something you did not write on a test whose rules forbade it, no phrasing turns it into a misunderstanding, and a live variant surfaces it inside five minutes. The cheapest response is the unglamorous one: say what you used, ask to redo the task live, accept that some companies will end it there. Owning it early sometimes earns a second attempt. Nothing is earned after a bluff collapses on a screen share.

Where OfferPilot AI does not help

Worth being blunt, since this page is published by a company that sells a coding assistant. Nothing our product does changes a similarity score. The overlay is excluded from screen capture at the operating-system level, so it is absent from a Zoom, Teams or Meet share, from recordings and from screenshots, which is beside the point here: the check reads submitted text long after any screen sharing is over. Capture exclusion also does nothing against webcam monitoring, a lockdown browser, eye tracking, a second-device camera or a person in the room.

There is a sharper version of the point. A model-drafted solution pasted in unaltered is close to the worst possible input to a similarity system, because everyone prompting that model with that task statement gets a near-identical program. So on an unattended timed assessment whose rules forbid outside assistance, Code Copilot is the wrong tool, and no framing changes that. It earns its place in untimed practice, where the value is the intuition, the dry run and the complexity reasoning rather than the code.

If your next stage is a call about the code you already submitted, that is a live round and a different problem. The Interview Copilot drafts from your own resume while you talk, on Windows 10 and 11 only, and the free tier on the pricing page is five minutes a day with no card.

Related guides