CIBC interview question

Leetcode medium coding questions