Domanda di colloquio di Audible

Defining a function to solve an array related questions.