TodayTix Interview Question

Code out how you would solve this problem