Why is my std::priority_queue with custom comparator ordering elements incorrectly?
I was refreshing some algorithm knowledge and implementing djikstra in c++ and saw this seemingly broken behavior in std::priority_queue. Can anyone shed some light on why I might be seeing this? I created a priority_queue with a custom comparator, to allow me to insert indices into the priority_queue and prioritize them based on the minimum… Read More Why is my std::priority_queue with custom comparator ordering elements incorrectly?