Viagogo interview question

Quick sorting with some scenario twisting.