Mid-Level
November 18, 2026

Spot the bug: Android

One snippet. Find the bug, or prove there isn't one.

kotlin
1fun createCounters(): List<() -> Int> {
2    val counters = mutableListOf<() -> Int>()
3    var i = 0
4    while (i < 5) {
5        counters.add { i }
6        i++
7    }
8    return counters
9}

Click the lines that carry the problem.

Your verdict

One attempt per day. The answer shows up right after.

Keep your streak

Create an account to keep your streak and track your progress.

Create an account