Created
September 6, 2022 20:39
-
-
Save iaverypadberg/4a37b789c46bcf0ef4115c32502339ff to your computer and use it in GitHub Desktop.
Argsort in Kotlin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun argsort(needsSorting : Array<Int>){ | |
val theRange = IntRange(0,needsSorting.size-1) | |
val idxs = theRange.toList().sortedBy { needsSorting[it] } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment