What is wrong in the code?

hi @deepaksehrawat150_50930f2fcb83f47e
refer this -->

i understood it, can we do this question using class instead of pair, what is wrong with my code? can you please explain

hi @deepaksehrawat150_50930f2fcb83f47e
sry for delayed reply… there were 2 errors…
1.

bool operator()(node A,node B){

here u had written spelling of ‘operator’ wrong…

vector<vector<int>>v(n, vector<int>(n));

u had not declared the 2d vector properly…
corrected code -->


It’s working fine now…

1 Like

@deepaksehrawat150_50930f2fcb83f47e
is there anything else or shall I mark the doubt as resolved??

1 Like

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.