Dummu - Algorithm in Kotlin
Posted On: 26 August 2026
The brute-force version works fine until the input size stops being small.
Why this matters for Kotlin
This is a bold claim, an italic aside, and an underlined point, all in one Kotlin example.
What it touches:
- The Kotlin runtime or interpreter
- Whatever calls the code around it
- Anyone reading this six months from now
How to apply it:
- Read the snippet below once, slowly.
- Try changing one value and predict the output before running it.
- Compare your prediction against what actually happens.
"Big O is not academic. It is the difference between instant and unusable at scale."
fun double(n: Int) = n * 2
Reference: Kotlin documentation
Big O is not academic. It is the difference between instant and unusable at scale.