Goldman Sachs Interview Question

FInd the repeated elements in an array(java) Rain water problem