Implements trie data structure following Keogh's HOT SAX article.