Jumia interview question

it was a codility task