Suffix tree: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) m (→{{header|Sidef}}: Fix link: Perl 6 --> Raku) |
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: Fix link: Perl 6 --> Raku) |
||
Line 1,010: | Line 1,010: | ||
Here is quite a naive algorithm, probably <math>O(n^2)</math>. |
Here is quite a naive algorithm, probably <math>O(n^2)</math>. |
||
The display code is a variant of the [[visualize_a_tree# |
The display code is a variant of the [[visualize_a_tree#Raku|visualize a tree]] task code. |
||
<lang perl6>multi suffix-tree(Str $str) { suffix-tree flat map &flip, [\~] $str.flip.comb } |
<lang perl6>multi suffix-tree(Str $str) { suffix-tree flat map &flip, [\~] $str.flip.comb } |