i used the conitnue statement for source node while printing but still i ma getting 1342 as output
Shows output for source node as 1342
you have’nt used else, also the way you are printing is wrong , in your code , when you are initializing dist map to INT_MAX, you need to initialize for 1 to n , since there can be isolated nodesso taking the key value from m does;nt include all the nodes also you have to output based on increasing order of their labels i.e 1 to n .
refer this code :- https://ide.codingblocks.com/s/233088
https://ide.codingblocks.com/s/239631 I was printing an extra line in line no 44 i removed it, now it shows correct output for custom input but fails upon final submission
i have explained in my above post what you are doing wrong refer to the code link i have attached
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.