Pregunta de entrevista de Amazon

The first coding question is about array. The second is about 2 pointers.