Value in a given range with maximum XOR
Given positive integers N, L, and R, we have to find the maximum value of N ? X, where X ? [L, R].Examples: Input : N = 7 L = 2 R = 23 Output : 23 Explanation : When X = 16, we get 7 ? 16 = 23 which is the maximum value for all X ? [2, 23].Input : N = 10 L = 5 R = 12 Output : 15 Explanation : When X