Sorting algorithms/Insertion sort: Difference between revisions

→‎{{header|REXX}}: simplified and optimized the insertionSort subroutine.
m (→‎{{header|REXX}}: added/changed comments and whitespace, added a title separator, extended the fence (width).)
(→‎{{header|REXX}}: simplified and optimized the insertionSort subroutine.)
Line 2,163:
/*──────────────────────────────────────────────────────────────────────────────────────*/
insertionSort: procedure expose @.; parse arg #
do i=2 to #; $=@.i; do j=i-1 by -1 whileto j\==01 & while @.j>$
_=j+1; @._=@.j
end /*j*/
_=j+1; @._=$
end /*i*/