if we use heap (priority queue) then we don’t have to upheapify?? ( used in the last part of video upheapify part )
Regards heap used in video
hey @amankumar7017
if you are using inbuilt priority queue .
upheapify function will Work internally .
exactly I did the same but output was not correct
why inbuilt heap(priority queue ) don’t work here ??
@amankumar7017 You need to use a comparator.
If you are learning graph for the first time. i would suggest you , Maam ko follow kro, best rahega
bro if you can provide code for this (which includes priority queue ) then it would be more better to me .
@amankumar7017
Try your self.
Inside the priority queue use a anonymous comparator ,
the elements of the priority queue are ordered by default in natural order .