Find bitwise AND (&) of all possible sub-arrays
Given an array A of size N where [Tex]1\leq N \leq 10^{5} [/Tex]. The task is to find the AND of all possible sub-arrays of A and then the AND of all these results. Examples: Input : 1 2 3 Output : 0 All possible subarrays are {1}, {2}, {3}, {1, 2}, {2, 3} and {1, 2, 3} ANDs of these subarrays are 1