Concept Flow - Two Non Repeating Elements in Array Using XOR
Start with array
Compute XOR of all elements
Find rightmost set bit in XOR result
Divide elements into two groups based on set bit
Compute XOR separately in each group
Result: two unique non-repeating elements
We first XOR all elements to get XOR of two unique numbers. Then find a bit where they differ to split array into two groups. XOR each group to find the unique elements.
