Longest Nice Subarray
A subarray is nice when the bitwise AND of every pair of distinct elements is zero — meaning no two elements share a common set bit. Given an array nums, find the length of the longest nice subarray.
A subarray is nice when the bitwise AND of every pair of distinct elements is zero — meaning no two elements share a common set bit. Given an array nums, find the length of the longest nice subarray.