SPIDRMAN : Getting WA (Directi Recruitment Contest)

Problem ->SPIDRMAN

Solution -> solution

I am doing BFS using priority queue.

1 Like

Your custom comparator is wrong according to this question as it’ll push the max value on top of the priority queue…

corrected one :

bool operator<(point const& n1, point const& n2)


return n1.val > n2.val;


Thank you :slight_smile: