Startup / VO Online Assessment Interview Problem: Dict Bot

17 Views
No Comments

Dict Bot

We are building a small chat bot that can receive messages and keep track of what everyone has said.

Given a sequence of messages, implement a function that processes each message and produces the corresponding bot outputs.

The bot should support the following message patterns:

  • A message indicating that a user says something.
  • A message indicating that a user is away.
  • A message indicating that a user returns and updates their away status.
  • A special message about meeting with Google Meet.
  • A special message about tacos and how many a user has.

The bot must store messages and update user states accordingly.

The exact formatting of bot outputs should match the problem requirements.

This problem is mainly about parsing structured strings and maintaining per-user state. You process chat-like messages in order, detect several message patterns, and update dictionaries for away status, stored messages, and counters such as taco totals. The key challenge is handling each branch correctly and producing exactly formatted outputs.

END
 0