Pergunta de entrevista da empresa Amazon

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