medium10 pts · first answer countshash-mapgrouping
Total spend per customer
Transactions are [{ c: "A", amt: 500 }, { c: "B", amt: 200 }, { c: "A", amt: 300 }]. Grouping with a Map from customer to total, what are the totals?
Discussion 0
Join free to post in the discussion.
Related questions
- Average cost of a hash map lookupBackend Developer
- Worst case for a hash map lookupBackend Developer
- Removing duplicates with a SetBackend Developer
- Number keys in a plain objectBackend Developer
- Iteration order of a MapBackend Developer
- When to choose Map over a plain objectBackend Developer
- Set of look-alike objectsBackend Developer
- Counting letters in a wordBackend Developer