Company: Amazon HackOn_30may
Difficulty: medium
You are given an array of integers. Find the length of the longest contiguous subarray such that each element in the subarray has a unique number of 1's in its binary representation. Return the length of the subarray. Input Format The first line of input contains an integer 'N': represents the number of elements. Second line of input contains N space separated integers : representing elements of array Output Format Output contains an integer representing the length of the longest contiguous subarray where each element has a unique number of bits set to 1 in its binary representation. Constraints 1 <= N <= 10^5 1 <= array[i] <= 120 Sample Testcase 1 Testcase Input 4 3 9 12 15 Testcase Output 2 Explanation Binary Representation of Elements 3 (binary: 11, bit count: 2) 9 (binary: 1001, bit count: 2) 12 (binary: 1100, bit count: 2) 15 (binary: 1111, bit count: 4) The longest contiguous subarray with unique bit counts has a length of 2. Subarray: [12 15] Sample Testcase 2 Testca