PyRival icon indicating copy to clipboard operation
PyRival copied to clipboard

Switching to segtree based Dijkstra for extra speed

Open bjorn-martinsson opened this issue 4 years ago • 0 comments

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.

bjorn-martinsson avatar Jan 23 '21 19:01 bjorn-martinsson