public void insert(int[] nums) { foreach (int num in nums) { Node421 curr = this.root; for (int i = 31; i >= 0; i--) { int currBit = (num >> i) & 1; if (!curr.children.ContainsKey(currBit)) { curr.children.Add(currBit, new Node421()); } curr = curr.children[currBit]; } } }
public Trie421() { this.root = new Node421(); }