Skip to content

Instantly share code, notes, and snippets.

@albodelu
Forked from Atternatt/CollectionExtensions.kt
Created September 21, 2017 04:55
Show Gist options
  • Select an option

  • Save albodelu/5eb11f172ba4a35150d6d46789528de4 to your computer and use it in GitHub Desktop.

Select an option

Save albodelu/5eb11f172ba4a35150d6d46789528de4 to your computer and use it in GitHub Desktop.
Extensions Basis
fun <T : Comparable<T>> List<T>.sort() {
Collections.sort(this)
}
list.sort();
val index = list.binarySearch(x);
val
Collection.sort(list);
int index = Collections.binarySearch(list, x);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment