Returns the k greatest elements of given set.
List<num> topElements (int k) { var copy = toList(growable: false); copy.sort(); return copy.sublist(length-k); }