Problem 43568. Bubble sort
Write your own bubble sort function ( <https://en.wikipedia.org/wiki/Bubble_sort>) to sort all elements in x in ascending order.
You cannot cheat by using the function "sort.m". If your solution even contains the word "sort", the assertion will fail!
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers36
Suggested Problems
-
Which values occur exactly three times?
5079 Solvers
-
Flip the main diagonal of a matrix
796 Solvers
-
Flag largest magnitude swings as they occur
678 Solvers
-
345 Solvers
-
Find the sides of an isosceles triangle when given its area and height from its base to apex
1876 Solvers
More from this Author25
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!