GlobalLogic interview question

Written test is very hard