示例#1
0
 /// <summary>
 /// CONSTRUCTOR
 /// </summary>
 public Trie()
 {
     _count = 0;
     _root  = new TrieNode(' ', false);
 }
示例#2
0
        /// <summary>
        /// IComparer interface implementation
        /// </summary>
        public int CompareTo(TrieNode other)
        {
            if (other == null)
                return -1;

            return this.Key.CompareTo(other.Key);

        }
示例#3
0
 /// <summary>
 /// Clears this insance.
 /// </summary>
 public void Clear()
 {
     _count = 0;
     _root.Clear();
     _root = new TrieNode(' ', false);
 }