Material for the Almost Certainly Correct talk organised by UCCPS.
The two .cpp
source files are solutions to the array search problem: the first
line of the input are the length of the array and a percentage p
, and the
second line contains a whitespace-separated array; the output is a value that
appears in p%
of the locations if such a value exists, or -1
if it doesn't.