Skip to content

Instantly share code, notes, and snippets.

@fjyuu fjyuu/
Created Nov 13, 2012

What would you like to do?
Code Golf of Burrows-Wheeler Transform
#!perl -pl
#!perl -palF""
@i=sort{"@F[$a..$#F] @F[0..$a-1]"cmp"@F[$b..$#F] @F[0..$b-1]"}0..$#F;$_=join"",map{$_--?"$F[$_]":"[$F[$_]]"}@i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.