+ 2

Tell me how to sort number without using collection

write a program to sort numbers without using collection

7th Oct 2017, 6:29 AM
S 11
S 11 - avatar
3 Antworten
+ 3
One can use any sorting algorithms (bubble sort, selection sort, insertion sort, quick sort, heap sort etc). If you are sorting a list instead of an array, you can convert it to array for simplicity. Below is the code for bubble sort---- https://code.sololearn.com/cg471Lvj860a/?ref=app
7th Oct 2017, 6:55 AM
Anuj Khetan
Anuj Khetan - avatar
+ 2
@ Adi Pratama sort() method is a part of Collections and we dont have to use it here.
7th Oct 2017, 6:57 AM
Anuj Khetan
Anuj Khetan - avatar
0
Thanks
7th Oct 2017, 9:38 AM
S 11
S 11 - avatar