Problem Given an integer array nums, return the maximum result of nums[i] XOR nums[j], where 0 ≤ i ≤ j < n. Constraints: 1 <= nums.length <= 2 * 1040 <= nums[i] <= 231 - 1 Example1 Input: nums =
421 · Simplify Path Algorithms Description Given an absolute path for a file (Unix-style), simplify it. In a UNIX-style file system, a period . refers to the current directory. Furthermore, a double
1. 题意 求数组中两个数的最大异或值 数组中两个数的最大异或值 2. 题解 2.1 哈希表 a i ⊕ a j = x a_i \oplus a_j = x ai⊕aj=x 所以 a i = x ⊕ a j a_i =x \oplus a_j ai=x⊕aj 考虑 a i 、 a j a_i、a_j ai、aj的每一位的所有情况 b i t ( a i , k )