Generate an array of minimum sum whose XOR of same-indexed elements with given array are Prime Numbers
Given an array Arr[] of N ( 1 ? N ? 105)integers, the task is to generate an array B[] consisting of N non-zero elements, such that XOR of Ai ^ Bi always results in a prime number. Note: The sum of XORs obtained should be minimized. Examples: Input: arr[] = {5, 4, 7, 6} Output: {7, 6, 5, 4} Explanat