two pointers

Visual explanation coming soon.