Pregunta de entrevista de X

array number manipulation and returning after simple computation