TikTok interview question

Find the shortest path between two points