finding duplicate elts in a big list. Probably could have been O(n) but at least it's O(nlogn)