Find pair whose bitwise OR and bitwise AND follows the given condition
Given 2 arrays arr1[] and arr2[], of size N and M respectively, the task is to find a pair of value (say a and b) such that the following conditions are satisfied: (a | b) ? arr1[i] for all values of i in the range [0, N-1].(a & b) ? arr2[j] for all values of j in the range [0, M-1]. Examples: Input: arr1[] = { 6, 9, 7, 8}, arr2[] = {2, 1, 3, 4