Numbers that are bitwise AND of at least one non-empty sub-array
Given an array 'arr', the task is to find all possible integers each of which is the bitwise AND of at least one non-empty sub-array of 'arr'. Examples: Input: arr = {11, 15, 7, 19} Output: [3, 19, 7, 11, 15] 3 = arr[2] AND arr[3] 19 = arr[3] 7 = arr[2] 11 = arr[0] 15 = arr[1] Input: arr = {5, 2, 8,