i***c 发帖数: 2 | 1 There are numbers from 1 to N in an array. out of these, one of the number
gets duplicated and one is missing. The task is to write a program to find
out the duplicate number. Conditions: you have to do it in O(n) time without
using any auxilary space (array, bitsets, maps etc..). |
|