public boolean insert(String s) {
            TrieNode p = root_;
            for(char c : s.toCharArray()) {
                if(!p.getLeaves().containsKey(c)) {
                    p.getLeaves().put(c, new TrieNode());
                }
                p = p.getLeaves().get(c);
            }

            // s already existed in this trie.
            if(p.getIsString()) {
                return false;
            } else {                  // p.getIsString() == false
                p.setIsString(true);  // inserts s into this trie.
                return true;
            }
        }