Morgan Stanley interview question

The previous project explained in details.