Given an integer array arr, consider every non empty contiguous subarray of arr. For each such subarray, compute the bitwise OR of all its elements. Return the number of distinct values that can appear among these bitwise OR results.
Constraints:
arr.length
arr[i]
Given an integer array arr, consider every non empty contiguous subarray of arr. For each such subarray, compute the bitwise OR of all its elements. Return the number of distinct values that can appear among these bitwise OR results.
Constraints:
arr.length
arr[i]