You are given an integer array nums of length n, which is a permutation of the integers from
You can choose a non negative integer k. In one operation, you may swap two elements nums[i] and nums[j] if nums[i] & nums[j] == k. You can perform this operation any number of times.
Return the maximum value of k such that nums can be sorted in ascending order.
Constraints:
nums.length
nums[i]
nums is a permutation of integers from
You are given an integer array nums of length n, which is a permutation of the integers from
You can choose a non negative integer k. In one operation, you may swap two elements nums[i] and nums[j] if nums[i] & nums[j] == k. You can perform this operation any number of times.
Return the maximum value of k such that nums can be sorted in ascending order.
Constraints:
nums.length
nums[i]
nums is a permutation of integers from