208. Implement Trie (Prefix Tree)
[https://leetcode.com/problems/implement-trie-prefix-tree/]
LintCode-442.Implement Trie [http://www.lintcode.com/en/problem/implement-trie/]
Implement a trie with insert, search, and startsWith methods.
Note:
You may assume that all inputs are consist of lowercase letters a-z.
class TrieNode {
private var children: [TrieNode?] = []
public var