Sogeti interview question

I only needed to solve on algorrithm problem.