add a new solution, use two pointers