谷歌Onsite题 Get a Random Word From Trie

Implement a trie with the following API

class Trie {

	public void addWord(String word) {
	}

	/**
	* Returns all the words in the trie.
	*/
	public Set<String> getAllWords() {
	}

	/**
	* Returns a random word from current set of words. Each word must have the equal probability of being returned.
	*/
	public String getRandomWord() {
	}

}

需要在节点中记录个子节点中单词总数