Sorting algorithms/Bubble sort: Difference between revisions

m
J code brought closer to the specification
m (J code brought closer to the specification)
Line 570:
=={{header|J}}==
<lang J>
bubbleSort=: |. @: ((([ (>. , <.) {.@]) , }.@])/^:_)
</lang>
 
Line 579:
4 6 8 6 5 8 6 6 6 9
bubbleSort ?. 10 $ 10
94 8 85 6 6 6 6 6 58 48 9
</lang>
 
Anonymous user