equivalent to a sorted dictionary that allows duplicate keys
问题 I need a data structure that can sort objects by the float keys they're associated with, lowest first. The trouble is that the keys represent cost so there are often duplicates, I don't care about this because if two have the same cost I'll just grab the first as it makes no difference, the problem is that the compiler complains. Is there a data structure that behaves in the same way but allows duplicate keys? EDIT - I still need the duplicates though because if one turns out to be a dead-end