Deloitte interview question

Leetcode-type questions