Pergunta de entrevista da empresa Visa Inc.

Hackerrank array based question on moving up down left right.