Python has a problem with being slow when it comes to having tuples inside of a heap. There have been multiple problems on codeforces.com with currently no accepted python heap Dijkstra solutions. This PR adds a much more optimized Dijkstra using segment trees to get around using tuples and heaps.
Python has a problem with being slow when it comes to having tuples inside of a heap. There have been multiple problems on codeforces.com with currently no accepted python heap Dijkstra solutions. This PR adds a much more optimized Dijkstra using segment trees to get around using tuples and heaps.