a shorter implemetaion of 3 sum