.schwartzSort!(x => tuple(-arr.count!(y => y == x), x))

But calling "count" for each item is not efficient (in both C# and D). If your array is largish, then you need a more efficient solution.

Bye,
bearophile

Reply via email to