Vaticle interview question

Coding question in a statically typed language.