Deloitte interview question

Technical coding round on salesforce scenario