NewThe Learning module is now liveSee what's new

You are building a component that tracks the cumulative earnings of named experiences (games, features, or events) on a large online platform.

The component processes two types of operations: an update adjusts the cumulative earnings of one experience, and a query returns the name of the experience with the highest total earnings at that moment.

You receive three arrays of equal length n: operations, experiences, and deltas. Each element of operations is either "U" (update) or "Q" (query).

Test Cases
Input
Output
Expected