DEV Community


Discussion on: The Good, The Bad and The Ugly Solutions to Leetcode’s Single Element in a Sorted Array

fumblehool profile image
Damanpreet Singh

Another way would be bit-wise manipulation.
Perform XOR operation for every element. The result of XOR operations will be our required result.

codechunker profile image
codechunker Author

wow i would love to know how to do that. Not so good with bit manipulations. Please can you help. would love to learn from you thank you.