Ticketfly Interview Question

seat pick algorithm.