I understood the concept but i need help on taking input

in kruskals we used edges[i]={x,y,w}
here we did edges.pb({x,y,w})
so i changed my code
also i wanted to access the edges using for loop as did in kruskals and not use auto
but i am getting the wrong answer
can u plzz modify the code
and dont use auto…
link-https://ide.codingblocks.com/s/268881

@PoojaSingh22
I didn’t get your question. Do you want to print edges from a vector without using auto?
for that you can simply do,

for(int i = 0;i<vector.size();i++){
for(int j = 0;j<vector[i].size();j++){
cout<<vector[i][j]<<" ";

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.