Category: Bitwise-OR

Bitwise OR of Bitwise AND of all subarrays of an array

Bitwise OR of Bitwise AND of all subarrays of an arrayGiven an array arr[] consisting of N positive integers, the task is to find the Bitwise OR of Bitwise AND of all subarrays of the given array.Examples:Input: arr[] = {1, 2, 3}Output: 3Explanation:Following are the Bitwise AND of all possible subarrays are:{1}, Bitwise AND is […]

Continue Reading