Anonymous user
Sorting algorithms/Bubble sort: Difference between revisions
m
→{{header|AutoHotkey}}: Minor indentation and casing edit
m (→{{header|Ruby}}: formatting) |
m (→{{header|AutoHotkey}}: Minor indentation and casing edit) |
||
Line 141:
abc
)
bubblesort(var) ; each line of var is an element of the array
{
hasChanged = 1
size := array0
hasChanged = 0▼
loop, % (size - 1)▼
{
j := array%A_Indexj%▼
if (j < i)▼
{
array%aj% := temp
}
}
sorted .= array%A_Index% . "`n"
▲ sorted .= array%A_Index% . "`n"
▲return sorted
}
</lang>
|