Jump to content

Best shuffle: Difference between revisions

m
→‎{{header|REXX}}: elided the need for a B variable in the function.
(→‎{{header|REXX}}: elided a function, changed the bestShuffle function, added/changed whitespace and comments.)
m (→‎{{header|REXX}}: elided the need for a B variable in the function.)
Line 2,685:
end /*j*/
 
do k=1 for L; a=substr(x, k, 1) /*handle a possible rep. */
if a\== substr( xox, k, 1) then iterate /*obtainskip non-replications. single character. */
b= substr(ox, k, 1) /*obtain the original char.*/
if a\==b then iterate /*skip non-replications. */
if k==L then x=left(x, k-2)a || substr(x, k-1, 1) /*last case.*/
else x=left(x, k-1)substr(x, k+1, 1)a || substr(x, k+2)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.