If you are following along you may have noticed that I have been compiling a long list of soutions to my Find Duplicate Ints problem. I was talking to one of my co-workers, who is not a developer but used to do some Perl hacking, and he suggested that it could be done with regular expressions. Lo and behold, with the help of another of my more regular-expression-ized co-workers we found this to be true:
public int findDuplicate(final int[] array){
final Pattern p = Pattern.compile(".*?(\\d+. ).*?\\1.*");



