Domanda di colloquio di Amazon

First round was OA. Solve 2 medium leetcode questions