Domanda di colloquio di PerBlue

Two coding questions close to leetcode easy problems