Skip to content

Commit

Permalink
Use IntArray
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhoomchai L committed Oct 27, 2020
1 parent 5bbba1f commit 5651bdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Kotlin/InsertionSort.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fun insertionSort(array: Array<Int>) {
fun insertionSort(array: IntArray) {
for (i in array.indices) {
val tmp = array[i]
var j = i
Expand All @@ -11,7 +11,7 @@ fun insertionSort(array: Array<Int>) {
}

fun main() {
var input = arrayOf(42,27,5,7,0,15,2,99,1)
var input = intArrayOf(42,27,5,7,0,15,2,99,1)
print("Original list: ")
input.iterator().forEach { print("$it ") }
println()
Expand Down

0 comments on commit 5651bdd

Please sign in to comment.