Longest Nice Subarray
You're given an array, nums, consisting of positive integers.
A subarray of nums is considered nice if the bitwise AND of every pair of elements that are in different positions in the subarray is equal to 0.
Your task is to determine and print the length of the longest nice subarray.
A subarray is defined as a contiguous part of an array. Note that subarrays of length 1 are always considered nice.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)