數組異或操做,算法

給你兩個整數,n 和 start 。web 數組 nums 定義爲:nums[i] = start + 2*i(下標從 0 開始)且 n == nums.length 。數組 請返回 nums 中全部元素按位異或(XOR)後獲得的結果。svg 來源:力扣code class Solution { public int xorOperation(int n, int start) {
相關文章
相關標籤/搜索