What the time complexity of dikastra using set

what the time complexity of dikastra using set explain??

hello @shashankmaheshwari054

it will be (ELOGV + VLOG(V)) which is smae as ELOGV .

the outer while loop will run for V time and in each iteration we are getting minimum most from set and erasing from the set
this makes VLOGV and then in each iteration we are iterating to neigbours and updating if needed which is
ElogV in total
hence final complexity will be
ELOGV + VLOGV

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.