in reply to Re: suffix array efficiency
in thread suffix array efficiency

Fascinating! But should it not be $b+$off in

my @indices = sort {$off = 0; until (substr($string, $a+$off, $step) cmp substr($string, $b, +$step)){ $off += $step; } } 0 .. length($string) - 1;

Replies are listed 'Best First'.
Re^3: suffix array efficiency
by kennethk (Abbot) on Jan 20, 2014 at 18:20 UTC

    I have no idea how that happened. Corrected the node, re-ran the script, found a bug in the caching code, updated results, etc. Thanks.


    #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.