3sum time exceeding problem

The original solution got time exceeding error. This is due to the final sort and unique calling. This approach avoid the unique on-the-fly. It is a little more timing efficient.