Domanda di colloquio di PepsiCo

Asked a leetcode easy question and OOPs concepts