Skip to content

Latest commit

 

History

History
 
 

164

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

This problem was asked by Google.

You are given an array of length n + 1 whose elements belong to the set {1, 2, ..., n}. By the pigeonhole principle, there must be a duplicate. Find it in linear time and space.