Compute buffet revenue with capacity and waiting | Upstart Coding Question