This is a simple C project that simulates how a restaurant manages its waitlist and tables.
- Adds customers (parties) to a waitlist
- Seats them based on table availability
- Manages tables using a smart approach
- Allows cancelling and prioritizing (VIP) customers
- Shows estimated waiting time
- Waitlist is handled using a queue (linked list)
- Tables are stored using a binary search tree (BST) based on capacity
- The system tries to find the best table for each party
main.c→ runs the program and menurestaurant.c→ contains all functionsrestaurant.h→ structure definitions and declarations
Open terminal in the project folder and run:
gcc main.c restaurant.c -o restaurant
./restaurant
- Add a new party
- Seat next party
- View current waitlist
- Estimate wait time
- View all tables
- Free a table
- Cancel a reservation
- Mark a party as VIP
- Each party’s waiting time is estimated as
size × 5 minutes - VIP customers are moved ahead in the list
- Tables are assigned based on availability and size