Anonymous user
Suffix tree: Difference between revisions
m
→{{header|Python}}: Remove use of mutable list as argument default (otherwise all "empty" nodes share the same children list which may be mutated by the algorithm)
No edit summary |
m (→{{header|Python}}: Remove use of mutable list as argument default (otherwise all "empty" nodes share the same children list which may be mutated by the algorithm)) |
||
Line 1,082:
{{trans|D}}
<lang python>class Node:
def __init__(self, sub="", children=
self.sub = sub
self.ch = children or []
class SuffixTree:
|