my question here
Write a function sorting(L) that takes a list of numbers and returns the list with all
elements sorted in ascending order.
Note: do not use the sort built in function
my code here
i think i could not use this
(Apr-21-2017, 07:52 PM)MoIbrahim Wrote: [ -> ]i think i could not use this
I would assume so. Anyway, you need to show us an attempt.
My assumption is that your instructor probably expects you to implement bubble or insertion sort:
https://en.wikipedia.org/wiki/Sorting_algorithm
def sorting(items):
return sorted(items)
ezpz
(Apr-21-2017, 08:05 PM)nilamo Wrote: [ -> ]def sorting(items): return sorted(items)
ezpz
thank you but i can't use that
Your thread is going to end up locked in a second. You have been told you need to make an honest attempt. I gave you a link to sorting algorithms. I told you which ones to look at. Make an attempt and THEN reply.
What have you tried so far? We can keep making jokes all day, but we're not going to write it for you.
If you just want an answer, go to wikipedia and copy-paste their quicksort example.