find the closest pair of points in a 2 dimensional space.? write an algorithm.
Sigiloso
Answer to your question. "1) How would you find a number which is repeated odd number of times in array of number where every other number is repeated even no of times.? " Soln: 1) Use XOR operation 2) for example, 1 ^ 1 =0. So if any number is repeated even number of times it is zero. 3) If a number is repeated odd number of times say 3 times then a) 3^3 =0 b)0^3=3. int XOR=array[0] for(int i=1;i