Visa Inc. interview question

Questions were based on sorting and two pointers