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.

Examples
Input: [1,3,8,48,10]
Output: 3
Hints

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.