O(n^2) is good!


#1

If you use hashing and submit a O(n^2) algorithm then you are good. The worst case O(n^4). So relatively this is way better.