0

Considering $n$ number of pieces of data, what would Dijkstra's shortest path algorithm time complexity be if it was stored using a data structure with following properties?

• delete the record with the minimum value of the key (complexity $O(log n)$);

• decrease the key of some record (complexity $O(1)$);

• find the record with the minimum value of the key (complexity $O(1)$);

• insert a new record (complexity $O(1)$).

I think it would be $O(nlogn)$, but am having trouble proving it. Does anyone have suggestions? Thanks!

Raphael
  • 73,212
  • 30
  • 182
  • 400
Lola1984
  • 185
  • 1
  • 8

0 Answers0