97
правок
Изменения
м
→Псевдокод
last_char = '$'
'''for''' suf '''in''' suffs
'''if''' s[suf] != <tex> \neq </tex> last_char
last_char = s[suf[i]]
classesN++
mid1 = (suffs[i] + cur_len) % str.length
mid2 = (suffs[i - 1] + cur_len) % str.length
'''if''' classes[suffs[i]] != <tex> \neq </tex> classes[suffs[i-1]] '''or''' classes[mid1] != <tex> \neq </tex> classes[mid2]
classesN
new_classes[suffs[i]] = classesN