Sorting algorithms/Insertion sort: Difference between revisions
Content deleted Content added
→{{header|REXX}}: restructured the body of the REXX program. -- ~~~~ |
|||
Line 1,514: | Line 1,514: | ||
while(j >= 0 && a[j] > v){ |
while(j >= 0 && a[j] > v){ |
||
a[j+1] = a[j]; |
a[j+1] = a[j]; |
||
j = |
j -= 1; |
||
} |
|||
a[j+1] = v; |
a[j+1] = v; |
||
} |
|||
return a; |
return a; |
||
}</lang> |
}</lang> |