Compute buffet revenue with capacity and waiting | Upstart Interview Question