CSES - Dijkstra's algorithm

Test the operation of the Dijkstra's algorithm given in the course material using a graph constructed as follows:

  • The nodes are 1,2,\dots,N and N=5000.
  • The start node is the node 1.
  • There is an edge from a node a to a node b, if a<b and b-a<10.
  • The weight of each edge is a random number in the range 1 \dots 1000.
  • The edges are in a random order on the edge list.

How much time did the execution take? s

The code you used in the test: