4sum, o(n^3), using greedy method