Tech Mahindra interview question

Tell me more about shortest path calculation