Toptal interview question

To implement a take home assignment