Ensolvers interview question

About time free to do the test.