Sorting functions. So you can write something simple like
// at this point in the sort, we know we must
// swap x with some other value
if a[x] < a[y] {
swap(&a[x], &a[y])
} else {
swap(&a[x], &a[z]) // a[x] and a[z] may be the same value
}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Sorting functions. So you can write something simple like