Sorting algorithms/Bubble sort: Difference between revisions
Content added Content deleted
(→{{header|Kotlin}}: Remove redundant initialisation) |
|||
Line 1,755: | Line 1,755: | ||
9 17 25 38 55 63 71 80 88 90</pre> |
9 17 25 38 55 63 71 80 88 90</pre> |
||
=={{header|Mathematica}}== |
=={{header|Mathematica}} / {{header|Wolfram Language}}== |
||
<lang Mathematica>bubbleSort[{w___, x_, y_, z___}] /; x > y := bubbleSort[{w, y, x, z}] |
<lang Mathematica>bubbleSort[{w___, x_, y_, z___}] /; x > y := bubbleSort[{w, y, x, z}] |
||
bubbleSort[sortedList_] := sortedList</lang> |
bubbleSort[sortedList_] := sortedList</lang> |