Threesum solution