func missingTwo(nums []int) []int {
N := len(nums) + 2;
temp := 0
for _, num := range nums {
temp ^= num
}
for i := 1; i <= N; i++ {
temp ^= i
}
onlyOne := temp & (-temp)
num1, num2 := 0, 0
for _, num := range nums {
if num & onlyOne > 0 {
num1 ^= num
}else {
num2 ^= num
}
}
for i := 1; i <= N; i++ {
if i & onlyOne > 0 {
num1 ^= i
}else {
num2 ^= i
}
}
return []int{num1, num2}
}
01-28
2546
01-19
2193