a similar but harder problem

来源: 2009-05-18 09:43:31 [旧帖] [给我悄悄话] 本文已被阅读:

一个数组有n+1个数,都在1到n之间,并且每个数至少出现一次(有一个数重复了),找出那个重复的数(只能用constant memory)。