Lendis (Germany) interview question

Basically a random code challenge