mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-10 18:48:13 +08:00
31 lines
772 B
HTML
31 lines
772 B
HTML
<p>给你一个整数数组 <code>nums</code> ,返回<em> </em><code>nums[i] XOR nums[j]</code> 的最大运算结果,其中 <code>0 ≤ i ≤ j < n</code> 。</p>
|
||
|
||
<p> </p>
|
||
|
||
<div class="original__bRMd">
|
||
<div>
|
||
<p><strong>示例 1:</strong></p>
|
||
|
||
<pre>
|
||
<strong>输入:</strong>nums = [3,10,5,25,2,8]
|
||
<strong>输出:</strong>28
|
||
<strong>解释:</strong>最大运算结果是 5 XOR 25 = 28.</pre>
|
||
|
||
<p><strong>示例 2:</strong></p>
|
||
|
||
<pre>
|
||
<strong>输入:</strong>nums = [14,70,53,83,49,91,36,80,92,51,66,70]
|
||
<strong>输出:</strong>127
|
||
</pre>
|
||
|
||
<p> </p>
|
||
|
||
<p><strong>提示:</strong></p>
|
||
|
||
<ul>
|
||
<li><code>1 <= nums.length <= 2 * 10<sup>5</sup></code></li>
|
||
<li><code>0 <= nums[i] <= 2<sup>31</sup> - 1</code></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|