Amazon Interview Question

Shortest path between coordinates merge sort etc