$/="";$l=length($w=<>);map{print+chop}sort+map{substr"$w\0$w",$_,$l+1} +0..$l push@w,split//for<>;map{@_=sort@_;$_[$_]=$w[$_].$_[$_]for+0..$#w}0..$# +w;print+grep{s/\0$//}@_
In reply to Burrows-Wheeler transform by shi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |