Dijkstra’s Algorithm
Ah yes, Dijkstra’s algorithm. The one you swear you’ll never forget, and yet somehow in every contest you end up trying BFS on weighted edges (“because it worked last time, right?”). Spoiler alert: BFS is not magic. If edges have weights other than 1...
hrushikedar.hashnode.dev5 min read