1650, needs O(1) space 227, O(1) space 460, this one needs time complexity better than O(n^2) but no solutions are better than that. Any idea?