Thoughtworks interview question

The question for pair coding round is a problem on restaurant table booking.