Graphiq Interview Question

How to do pathfinding algorithm