Skip to content

Instantly share code, notes, and snippets.

@goindwalia
Created May 18, 2017 07:05
Show Gist options
  • Save goindwalia/f83744e46223a34f4d677b36b2970ea1 to your computer and use it in GitHub Desktop.
Save goindwalia/f83744e46223a34f4d677b36b2970ea1 to your computer and use it in GitHub Desktop.
fun MutableList<Int>.swap(index1:Int,index2:Int){
val tmp=this[index1]
this[index1]=this[index2]
this[index2]=tmp
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment