Exemplo n.º 1
0
        protected void InsertChar(char sym)
        {
            int first = SearchInsertPosition(sym.ToString());

            array.Insert(first, arrayLength);
            lcp.Insert(first, 0);
            if (first != arrayLength && stringBuilder[array[first + 1]] == sym)
            {
                lcp[first]++;
                boundarySuffix.Add(arrayLength);
            }

            stringBuilder.Append(sym);
            charCollector.AddChar(sym);
            arrayLength++;
        }
Exemplo n.º 2
0
 private void UpdateCharCollector(string str)
 {
     foreach (char c in str)
     {
         CharCollector.AddChar(c);
     }
 }