docs: private void add(int previous, int index, Trie.Node node) {
  
          if (!node.getChildren().isEmpty() && node.hasSinglePath()
                          && node.getChildren().get(0).getKey() != TERMINATING_CHARACTER) { // If node has only one path, put the rest in tail array
              baseBuffer.put(index, tailIndex); // current index of tail array
              addToTail(node.getChildren().get(0));
              checkBuffer.put(index, previous);
              return; // No more child to process
          }
  
          int startIndex = (compact ? 0 : index);
          int base = findBase(startIndex, node.getChildren());
  
          baseBuffer.put(index, base);
  
          if (previous >= 0) {
              checkBuffer.put(index, previous); // Set check value
          }
  
          for (Trie.Node child : node.getChildren()) { // For each child to double array trie
              if (compact) {
                  add(index, base + child.getKey(), child);
              } else {
                  add(index, index + base + child.getKey(), child);
              }
          }
  
      }