code: public Trie<V> trimToSize() {
        Queue<TrieNode<V>> queue = new LinkedList<>();
        queue.add(root);
        while (!queue.isEmpty()) {
           TrieNode<V> node = queue.remove();
           node.children.trimToSize();
           queue.addAll(node.children);
        }
        return this;
     }
docs: Compresses the memory of the individual trie nodes.
  
  @return this trie