Given an array of N integer such that only one integer is repeated. Find the repeated integer in O(n) time and constant space. There is no range for the value of integers or
We can do in linear time o(n) here as well
public class DuplicateInOnePass { public static void duplicate() { int [] ar={6,7,8,8,7,9,9,10}; Arrays.sort(ar); for (int i =0 ; i