Domanda di colloquio di Amazon

Both coding questions were easy