Dell Technologies Hiring Challenge | On Campus OA 2021 | Decode XORed Array | Bit Manipulation
Question · Posted Jun 2026
Problem Statement You are given an encoded integer array encoded and an integer first. The original array arr is encoded such that: encoded[i] = arr[i] XOR arr[i + 1] where XOR represents the bitwise XOR operation. Given the encoded array and the first element of the original array (first), reconstruct and return the original array. Example 1 Input encoded = [1,2,3] first = 1 Output [1,0,2,1] Explanation arr[0] = 1 arr[1] = arr[0] XOR encoded[0] = 1 ...
The full answer & interview discussion are available to premium members.
Log in Create a free account