Oracle Interview Question

Ques was on hackerrank. Go from one point to another coordinate in minimum path