Dijkstra algorithm

getting segmentation fault

hello @guptashubham210a

u r given vertces with 1 based indexing , and u r handling them as 0 based .
make required changes and then try to submit .
for any furthur issue feel free to ping me back

@aman212yadav
where I am handling as 0 index?

@guptashubham210a
image

here ur size is v which works only for 0 based, it should be atleast v+1 to work for 1based

@aman212yadav
I have made changes but then also

same error . . . . . . . .?

no output is coming in the console

ok wait . . . . . . . . . .

@aman212yadav
getting wrong output

@guptashubham210a
pls wait i m working on ur code only

@guptashubham210a

pls check ur code here(comment added)->

@aman212yadav
thanks got my mistakes

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.