Domanda di colloquio di JPMorganChase

Gave 2 leetcode problems. One easy and one medium