Dijkstra Algorithm

Why using priority queue in Dijkstra though it increase number of processings of nodes still have better time complexity than use of sets ?

hello @joshisanjay8467

performance wise both works almost same.
for some cases set gives faster result and sometimes pq.

check this-> link

1 Like

okay bhaiya got that was helpful article , thankyou