Bitwise ORs of Subarrays
Input:
[0]
Output:
1
Explanation:
There is only one possible result: 0.Input:
[1,1,2]
Output:
3
Explanation:
The possible subarrays are [1], [1], [2], [1, 1], [1, 2], [1, 1, 2].
These yield the results 1, 1, 2, 1, 3, 3.
There are 3 unique values, so the answer is 3.Last updated