Sorting algorithms/Bubble sort: Difference between revisions

Content added Content deleted
No edit summary
Line 2,945: Line 2,945:


=={{header|Scala}}==
=={{header|Scala}}==
[[Category:Scala Implementations]]
This slightly more complex version of Bubble Sort avoids errors
{{libheader|Scala}}
with indices.
This slightly more complex version of Bubble Sort avoids errors with indices.


<lang scala>def bubbleSort[T](arr: Array[T])(implicit o: Ordering[T]) {
<lang scala>def bubbleSort[T](arr: Array[T])(implicit o: Ordering[T]) {