Tôi có một SortedDictionary
như đã định nghĩa như thế này:Từ điển được sắp xếp đảo ngược?
SortedDictionary<TPriority, Queue<TValue>> dict;
Nhưng tôi muốn duy trì dict theo thứ tự ngược. Tôi cho rằng tôi cần đặt số Comparer
, nhưng tôi sẽ sử dụng bộ so sánh nào cho một số TPriority
chung? Lưu ý rằng TPriority
thực hiện IComparable
.
thể trùng lặp của [Xếp Sắp xếp từ điển trong .NET] (http://stackoverflow.com/questions/931891/reverse-sorted-dictionary-in -net) – nawfal