Deloitte interview question

Introduction only and the end