Lendis (Germany) Interview Question

Basically a random code challenge