Maximum XOR of Two Nodes in a Tree
<script> class TrieNode { constructor() { this.children = ; } } class Trie { constructor() { this.root = new TrieNode(); } insert(num) { let node = this.root; for (let i = 31; i >= 0; i--) { let bit = (num >> i) & 1; if…