Update solution. Use two pointers.