func (s *HashMultiSet[T]) GetTopValues() []MultiSetPair[T] {
	setPairs := make([]MultiSetPair[T], 0, s.Size())
	for key, count := range s.data {
		setPairs = append(setPairs, MultiSetPair[T]{Key: key, Count: count})
	}

	sort.SliceStable(setPairs, func(i, j int) bool {
		return setPairs[i].Count > setPairs[j].Count
	})
	return setPairs
}
// GetTopValues returns values ordered in descending order
GetTopValues returns values ordered in descending order
// GetTopValues returns values ordered in descending order
func (s *HashMultiSet[T]) GetTopValues() []MultiSetPair[T] {
	setPairs := make([]MultiSetPair[T], 0, s.Size())
	for key, count := range s.data {
		setPairs = append(setPairs, MultiSetPair[T]{Key: key, Count: count})
	}
	sort.SliceStable(setPairs, func(i, j int) bool {
		return setPairs[i].Count > setPairs[j].Count
	})
	return setPairs
}
func ( s * HashMultiSet [ T ] ) GetTopValues ( ) [ ] MultiSetPair [ T ] { setPairs := make ( [ ] MultiSetPair [ T ] , 0 , s . Size ( ) ) for key , count := range s . data { setPairs = append ( setPairs , MultiSetPair [ T ] { Key : key , Count : count } ) } sort . SliceStable ( setPairs , func ( i , j int ) bool { return setPairs [ i ] . Count > setPairs [ j ] . Count } ) return setPairs }
GetTopValues returns values ordered in descending order
GetTopValues returns values ordered in descending order