+ 8
CHALLENGE - Sort The Figures!
In your preferred language, write two functions/ methods (ascending and descending) that take numbers/figures as arguments and return the figures sorted: For instance, Sort(5, 3, 11, 8, 4, 3, 2, 6, 9) should return 2, 3, 3, 4, 5, 6, 8, 9, 11 for ascending sort and 11, 9, 8, 6, 5, 4, 3, 3, 2 for descending sort. PS: Code from scratch. Use no built in sort methods or functions. ā
5 Answers
+ 4
Something like this:
https://code.sololearn.com/W7mPjs1AYlUy/?ref=app
+ 2
Waoh. Cool.
But only flaw is that your function takes no arguments. One should be able to use it like a method. Also it shouldn't take an array as its parameter. Should be something like this Sort(5, 6, 2, 8, 4) not Sort([5, 6, 2, 8, 4]) and there should be two functions "SortAscending(arguments)" and "SortDescending(arguments) independent of each other. Good job BTW. ;)
+ 1
this is a python implementation Mr. Power
https://code.sololearn.com/cjpKgCHW9bV2/?ref=app
0
Hey Sunday. I'm. new to solo learn I need help