The CodeSignal Industry Coding Assessment gives you one project in four levels and 90 minutes. Levels 1 and 2 look easy. At Level 3, new requirements land on top of the code you already wrote. Often it’s a timestamp on every operation. CodeSignal’s own technical brief says Level 3 gets easier the more reusable your earlier methods are. So much of the score is set in the first 15 minutes, when you pick your data model. The common mistake is to store raw values in a map and move on. Then Level 3 forces a rewrite in four places. The one you miss fails hidden tests. The tactic is cheap. In Level 1, store a small record instead of a raw value. Send every read and write through one or two private helpers. And keep the method signatures you were given. Below, one Android engineer tries it the fast way and then the durable way. The code is yours to adapt.
The CodeSignal Industry Coding Assessment is one codebase scored by tests passed
CodeSignal’s help page on the Industry Coding Assessment rules sets out the format. There is one project-based question with four progressive levels. Each level builds on the requirements before it. The maximum time is 90 minutes. CodeSignal says you aren’t necessarily expected to finish. Scores run from 200 to 600. A higher score means you completed more of the question. The page also says the levels make you reuse and refactor earlier code. The goal is to stay backward compatible.
The technical brief behind the assessment goes further. It’s an undated PDF from CodeSignal. CodeSignal sells the test, so read it as the vendor’s own account. It gives a typical time for each level. Level 1 takes 10 to 15 minutes. Level 2 takes 20 to 30. Levels 3 and 4 each take 30 to 60. Those ranges add up to more than 90 minutes. That fits the brief’s point that how far you get is part of the measurement.
The brief is blunt about Level 3. Its difficulty depends on the quality of the methods you wrote earlier. An inefficient design will be costly to refactor there. By Level 4, the brief warns, a poor codebase can be almost impossible to refactor in time. The sample task in the brief also grants partial credit for each passing test. It tells candidates to press Submit often.
So Levels 1 and 2 check that you can write basic code. Levels 3 and 4 check whether that code can absorb change. The brief’s time ranges put most of the 90 minutes there too.
Omar’s Level 1 passes every test and still costs him Level 3
Take an Android engineer we’ll call Omar. He has six years of Kotlin. CodeSignal’s language list includes Kotlin for this assessment, so he sticks with it.
His task is our own example, built in the same shape as the brief’s sample. CodeSignal’s sample is a file hosting service. Ours is an in-memory store for feature flags. Level 1 asks for three methods. They set a flag, get a flag and delete a flag. Level 2 adds a scan by name prefix, sorted by name. Omar reads Level 1 and writes the shortest thing that passes.
class FlagStore {
private val flags = mutableMapOf<String, String>()
fun set(name: String, value: String) { flags[name] = value }
fun get(name: String): String? = flags[name]
fun delete(name: String): Boolean = flags.remove(name) != null
fun scan(prefix: String): List<String> =
flags.keys.filter { it.startsWith(prefix) }.sorted().map { "$it=${flags[it]}" }
}
All tests pass in about 12 minutes. That’s inside the brief’s range for Level 1, plus a quick Level 2. Nothing here is wrong. The trouble is what the map holds. Each name points straight at a string. There’s nowhere to put a second fact about a flag.
Level 3 adds a timestamp to every call, and the raw map has nowhere to keep it
Level 3 opens. Every operation now takes a timestamp. A flag can also be set with a time to live. After that many seconds, it should vanish from get and scan. The old methods must keep working, since their tests still run.
Omar can’t change the map’s value type without touching every method. So he adds a second map for expiry times. Then he copies each method into a timestamped version and adds the expiry check. Under time pressure, he misses one copy.
private val expiresAt = mutableMapOf<String, Long>()
fun setAt(timestamp: Long, name: String, value: String, ttl: Long? = null) {
flags[name] = value
if (ttl != null) expiresAt[name] = timestamp + ttl else expiresAt.remove(name)
}
fun getAt(timestamp: Long, name: String): String? {
val end = expiresAt[name]
if (end != null && timestamp >= end) return null
return flags[name]
}
// Copied from scan(). The expiry check never made it in.
fun scanAt(timestamp: Long, prefix: String): List<String> =
flags.keys.filter { it.startsWith(prefix) }.sorted().map { "$it=${flags[it]}" }
Run it with two flags. One has a 50-second time to live, set at time 10. At time 70, getAt correctly returns null for it. But scanAt at time 70 still lists it as on. The visible tests may not catch that. A hidden test on scan after expiry would. Omar also still owes deleteAt. It needs the same check a third time.
The brief warned about exactly this cost. Each new requirement has to be added once per method. Every copy is a place to forget it. Level 4 will add another requirement on top.
Store a record and route every access through one helper
Here’s the same Level 1, written for change. It takes about three more minutes. The flag is a small class instead of a raw string. And every public method calls one of two private helpers.
class FlagStore {
private class Flag(val value: String)
private val flags = mutableMapOf<String, Flag>()
fun set(name: String, value: String) = write(name, value)
fun get(name: String): String? = live(name)?.value
fun delete(name: String): Boolean = live(name)?.let { flags.remove(name); true } ?: false
fun scan(prefix: String): List<String> =
flags.keys.filter { it.startsWith(prefix) }.sorted()
.mapNotNull { name -> live(name)?.let { "$name=${it.value}" } }
private fun write(name: String, value: String) { flags[name] = Flag(value) }
private fun live(name: String): Flag? = flags[name]
}
Right now, live looks pointless. It just returns the map entry. Its job is to be the one place that decides whether a flag exists. When Level 3 adds expiry, the check goes into live once. Get, delete and scan all pick it up without being edited.
The record class works the same way for data. Adding a timestamp or an expiry time means adding a field to Flag. The map’s type doesn’t change, so no method signature breaks. The brief’s sample task asks candidates not to change existing method signatures. This structure makes that easy to honor.
Don’t go further than this in Level 1. You don’t know what Level 3 will ask. Guessing at features you might need burns minutes you’ll want later. A record and two helpers cost almost nothing. They help with nearly any change.
With helpers in place, Level 4 changes two functions
Our Level 4 asks for history. A new method returns the value a flag had at an earlier moment. That has to respect deletes and expiry as of that moment. In the brief’s sample, Level 4 is a rollback to an earlier timestamp. That needs the same kind of history.
Here is the complete class after Levels 3 and 4. The map now holds a list of versions per flag instead of one record. The old Level 1 methods run at time zero, so their signatures and tests stay untouched.
class FlagStore {
private class Flag(val value: String?, val at: Long, val expiresAt: Long?)
private val flags = mutableMapOf<String, MutableList<Flag>>()
// Levels 1 and 2: signatures unchanged, they run at time zero
fun set(name: String, value: String) = setAt(0, name, value)
fun get(name: String): String? = getAt(0, name)
fun delete(name: String): Boolean = deleteAt(0, name)
fun scan(prefix: String): List<String> = scanAt(0, prefix)
// Level 3
fun setAt(timestamp: Long, name: String, value: String, ttl: Long? = null) =
write(timestamp, name, value, ttl)
fun getAt(timestamp: Long, name: String): String? = live(name, timestamp)?.value
fun deleteAt(timestamp: Long, name: String): Boolean {
if (live(name, timestamp) == null) return false
write(timestamp, name, null, null)
return true
}
fun scanAt(timestamp: Long, prefix: String): List<String> =
flags.keys.filter { it.startsWith(prefix) }.sorted()
.mapNotNull { name -> live(name, timestamp)?.let { "$name=${it.value}" } }
// Level 4
fun valueAsOf(timestamp: Long, name: String, asOf: Long): String? =
live(name, minOf(asOf, timestamp))?.value
// Every read and write goes through these two
private fun write(at: Long, name: String, value: String?, ttl: Long?) {
flags.getOrPut(name) { mutableListOf() }.add(Flag(value, at, ttl?.let { at + it }))
}
private fun live(name: String, now: Long): Flag? {
val flag = flags[name]?.lastOrNull { it.at <= now } ?: return null
if (flag.value == null) return null
if (flag.expiresAt != null && now >= flag.expiresAt) return null
return flag
}
}
A delete now writes a version with no value, so history survives it. The live helper finds the latest version at or before the given time. Then it checks for a delete and for expiry. That one function answers get, scan, delete and the history question. The code assumes timestamps arrive in increasing order. Check whether your task says so. If it doesn’t, add a sort.
Run the same scenario through this version. At time 70, scanAt correctly drops the expired flag. Then set the second flag to on at time 80 and delete it at 90. At time 95, valueAsOf returns on for time 85 and off for time 30. Between Level 2 and Level 4, the public Level 1 methods became one-line calls. Most of the new logic went into two private functions.
A 90-minute plan for the CodeSignal Industry Coding Assessment
The clock needs a plan too. Here’s the one Omar uses on his real attempt. The minute splits are our own suggestion, built from the brief’s typical times. Adjust them to your pace.
0-3 Read the whole prompt and the visible tests. Note every method signature.
3-18 Level 1. Record class, write() and live() helpers, then the methods.
Submit as soon as tests pass.
18-35 Level 2. Build on live(); don't read the map directly. Submit.
35-40 Before Level 3 code: list each change, find where it lands.
If it lands in a helper, change the helper. If not, add one first.
40-75 Level 3. Submit after each method passes, not at the end.
75-90 Level 4. If it won't finish, spend the time on Level 3's edge cases:
expiry at the exact second, delete of an expired item, repeat writes.
CodeSignal’s help center notes that a question’s files can change when a new level opens. Its page on viewing level changes shows a diff of what was added, modified or removed. Open it at the start of each level. Then plan as if you won’t see a level’s requirements before you reach it.
Why each line of the plan earns points
The first three minutes protect the method signatures. The brief’s sample asks candidates not to change existing method signatures. The old tests also keep running. A renamed parameter or a changed return type can fail tests you had already passed.
Level 1 gets a few extra minutes for the record and helpers. That’s the only investment in the plan. It’s small because it doesn’t predict features. It only makes sure each future change has one place to land.
The five-minute pause before Level 3 is the easiest step to skip. Omar’s fast version broke because he started copying methods before he asked where expiry belonged. Listing the change first turns four edits into one.
Submitting after each method matters because of partial credit. The brief’s sample grants credit for each passing test. A Level 3 that’s half done and submitted can score. A full Level 3 that never got submitted before time ran out can’t.
The last block covers a bad case. The brief says Level 4 leans hardest on reusable earlier code. If yours isn’t reusable, more Level 3 tests may be worth more than a half-built Level 4. Edge cases like expiry at the exact second are cheap to check and easy to miss.
Two more rules apply before you start. Our post on the CodeSignal General Coding Assessment explains how scores get shared with later companies. The ICA has its own retake limit. Its rules page allows two attempts in a rolling 180 days. Each one needs a new invite. That GCA post also covers how CodeSignal’s Suspicion Score treats large pastes. Our post on pasting from your own IDE covers the same risk on HackerRank. So practice this format in a plain editor, the way you’ll take it.