Find an N-length permutation that contains subarrays with sum less than Bitwise XOR
Given a positive integer N, the task is to find a permutation of length N having Bitwise OR of any of its subarray greater than or equal to the length of the subarray. Examples: Input: N = 5 Output: 1 3 5 2 4 Explanation: Consider the subarray {1, 3, 5} from the permutation {1, 3, 5, 2, $}. Length o