Viagogo Interview Question

Quick sorting with some scenario twisting.