First implementation, two pointers