Deloitte interview question

Quite complex cases, more than usual.