Thanks Mike for always reading my posts and for this helpful feedback. I think you're right about the time complexity, though the XOR solution may use less space in memory than mine. In any case, you make a great point that it's more difficult to understand!