Hitachi interview question

Project diff faced in the execution