Exemplo n.º 1
0
 public static Heap <T> CreateMinHeap <T>(ICollection <T> collection, IComparer <T> comparer)
 => Heap <T> .CreateHeap(collection, comparer.Invert());
Exemplo n.º 2
0
 public static IComparer <T> ThenByDescending <T>(this IComparer <T> first, IComparer <T> second) =>
 new CompositeComparer <T>(first, second.Invert());
Exemplo n.º 3
0
 public static TSource Min <TSource>(this IEnumerable <TSource> source, IComparer <TSource> comparer)
 => Max(source, comparer.Invert());