Pergunta de entrevista da empresa Athena Health Care Systems

2 x 2 array: how to get from any point to another