LiveRamp Interview Question

optimization for path storing of Dijkstra Algorithm