LeetCode 898: Bitwise ORs of Subarrays
Problem Restatement We are given an integer array arr . For every non-empty contiguous subarray, compute the bitwise OR of all elements in that subarray. Return the number of distinct OR results. A subarray must be contiguous. The official constraints allow arr.length <= 5 * 10^4 and arr[i] <= 10^9 . ( leetcode.com ) Input and Output Item Meaning Input arr , an integer array Output Number of distinct bitwise...