DIJKSTRA'S ALGORITHM

i am getting wrong answer through this code. please check my code and help me finding the mistake
here is my code

@aditikandhway
Replace line 50-54 by

for(int i=1;i<=nodes;i++){
            if(i == src) continue;
            auto f = dis.find(i);
            if(f != dis.end()&&dis[i]!=INT_MAX){
                cout<<dis[i]<<" “;
            }
            else{
                cout<<”-1"<<" ";
           }
        }

We are printing like this because in map order of elements inserted can be different(shuffled).

still i am getting wrong answer https://ide.codingblocks.com/s/322752

@aditikandhway
this is your corrected code