Many rooms (Real-time Chat)
Rooms now have names: join <user <room, leave <user <room, say <user <room <text. Messages print as [<room] <user: <text - …, errors name the room. An empty message prints error: empty message.
Input: As before, with room names.
Output: As before.
Difficulty: Easy. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.
Hint
- A map from room name to its set of users.