Deloitte interview question

Asked Leetcode medium questions during assignment portion