Problem 2363 · Easy

Merge Similar Items

Add every item’s weight into a hash map keyed by value, then read the totals back in increasing value order.

Open the interactive visualisation