# queues easy

The Growing Line

Photograph the whole line at closing time. πŸ“·

You get commands (join:name / serve, serves valid). Print the final line from front to back, comma-separated, or empty.

Example:

Input: commands = ["join:mia", "join:leo", "serve", "join:kai"] Output: leo,kai

Mia and leo join, serve removes mia (the front), then kai joins the back β€” leaving leo,kai.

πŸ’‘ need a hint?

q-growing-line.pyπŸ”’ given lines are locked β€” write your code in between
loading...