Added solution using XOR