Blog # 77 : The Lonely Element
Given an array of integers with size 2N+1 such that N elements appear twice in arbitrary positions and 1 element appears only once. Devise an algorithm to find the lonely element. Ex : {1 2 4 5 1 4 2} Answer : 5 courtesy: Syed Wali Hamza Click here to see the solution. p.s. - For Remarks please hit the given link once. For Hint, hit it twice and for the solution, hit it thrice. |