Factorize string into Lyndon words: Difference between revisions
Factorize string into Lyndon words (view source)
Revision as of 01:05, 1 February 2024
, 3 months ago→{{header|Phix}}: added one-per-line output, as well.
(Added Algol 68) |
m (→{{header|Phix}}: added one-per-line output, as well.) |
||
Line 234:
end for
?chen_fox_lyndon_factorization(m)
-- alt:
printf(1,"\n%s\n",join(chen_fox_lyndon_factorization(m),"\n"))
</syntaxhighlight>
{{out}}
<
{"011","01","0011","00101101","0010110011010011","00101100110100101101001100101101","001011001101001011010011001011001101001100101101","001011001101","001"}
011
01
0011
00101101
0010110011010011
00101100110100101101001100101101
001011001101001011010011001011001101001100101101
001011001101
001
</pre>
|