N26 interview question

Coding challenge in Java