Tag Archives: cycle detection

Find the single number that duplicates one or more times

Find the single number that duplicates one or more times in an array in O(1) space and O(n) time without modifying the array Note: You must not modify the array (assume the array is read only). You must use only constant, O(1) extra space. Your runtime complexity should be less than O(n2). There is only […]