Question d’entretien chez Amazon

First round was OA. Solve 2 medium leetcode questions