Single Element in a Sorted Array

question–>


code–>

approach–>
using binary search (not xor method), if the starting position of the even then we have to search on the right side becuase the lonely element has not occurred else we search on the left side because the character has occured
gfg link–>

i am not able code the logic it gives tle

Hey @sheikhhaji18
Do a dry run to understand the corrections if req

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.