public class Solution { public int[] DecodeOne(int[] encoded, int first) { var arr = new int[encoded.Length + 1]; arr[0] = first; for (int i = 1; i < arr.Length; i++) { arr[i] = encoded[i-1]^arr[i-1]; } return arr; } public int[] DecodeTwo(int[] encoded, int first) { var intSize = sizeof(int); var arr = new int[encoded.Length + 1]; arr[0] = first; System.Buffer.BlockCopy(encoded, 0, arr, intSize, intSize * encoded.Length); for (int i = 1; i < arr.Length; i++) { arr[i] ^= arr[i-1]; } return arr; }}