three sum closet reimpl