Thoughtworks Interview Question

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