This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
debug_prints = False | |
class PalindromeTreeNode: | |
# Important to note: we don't use start_index and end_index much | |
# Because if this node is 'bb' and our string is 'abbacabbac' we'll see 'bb' twice | |
# So we use the length to calculate where in the full string the start index would be | |
# Each time we run across this node | |
# The start and end indices are useful for printing out this node though | |
start_index = 0 | |
end_index = 0 |