Skip to content

Commit

Permalink
Bubble sort using kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
amangautam1 committed Jul 16, 2017
1 parent 3bd6a93 commit 9282cba
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/BubbleSort.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import java.util.*


/**
* Created by Aman gautam on 13-Jul-17.
Expand All @@ -17,12 +17,14 @@ fun sort(arr:IntArray){
}
}
fun main(args:Array<String>){
//println("enter 5 Values :")
var arr = intArrayOf(52,21,33,41,53)
/*for(i in 0..4)
print("Enter size of array : ")
var n= readLine()!!.toInt()
var arr=IntArray(n)
println("enter values in array :")
for(i in 0..n-1)
{
arr[i]= readLine()!!.toInt()
}*/
}
sort(arr)
println("output....\n")
for(i in arr.indices) print(" ${arr[i]} ,")
Expand Down

0 comments on commit 9282cba

Please sign in to comment.