Pergunta de entrevista da empresa Amazon

Q1: The distance of position in a 2 dimensional matrix Q2: A reverse string function