Parse and Validate User Requests and Output Final Balances

You are given a sequence of requests, each represented as a string. The system supports (at least) the following request types:

  1. SIGNUP <user>: register a new user.
  2. `FRIEND_REQUEST <from> <to>...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: