+ 8
Bubble Sort
Can you implement the bubble sort on a tuple
6 ответов
+ 1
Actually you can sort tuples using sorted() but it will return a list
+ 4
A tuple is immutable. That's the question 😂
+ 2
There is also shell sort
+ 2
Then there is binary tree sort
+ 1
That largely depends on why you need a list sorted....
+ 1
You can turn it into a list, then sort it, then back into a tuple🤔 ill see if I can alter my bubble sort to do it
mmmm OK😁
Here is my implementation:
https://code.sololearn.com/cVpKbQ3fluqq/?ref=app