Prefix Key-Value Sum Query (MapSum)

Problem

You maintain a key-value store with pairs (key, value) where:

  • key is a string
  • value is an integer

Support two operations:

  1. insert(key, value): insert or update key with the...

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: