Toptal interview question

You need to complete an algorithmic task