TodayTix interview question

Asked to explain two-pointers solution for a problem