code: public TrieNode insert(String path) {
      TrieNode current = this;
      for (String component : path.split("/")) {
        if (!current.mChildren.containsKey(component)) {
          current.mChildren.put(component, new TrieNode());
        }
        current = current.mChildren.get(component);
      }
      current.mIsTerminal = true;
      return current;
    }
docs: Inserts a path into the trie.
  
  Each path component forms a node in the trie,
  root path "/" will correspond to the root of the trie.
  
  @param path a path with components separated by "/"
  @return the last inserted trie node or the last traversed trie node if no node is inserted