
Copy an inventory into out with every repeated id dropped, keeping the first of each.
December 1996. Diablo trusts your own machine to say what is in your bag, so dropping an item and cutting the connection at the right instant leaves it lying on the ground and sitting in your inventory. The sequel inherited the whole family of bugs, and duped Stones of Jordan became the currency the ladder economy priced everything in. Blizzard wiped inventories more than once. Keep the first copy of each item.
unique_items(out, {2,7,2,7,9}, 5)Expected result
3: 2 7 9For your own tracking. Tests grade your code.
unique_items(out, {5,5,5}, 3)Expected result
1: 5unique_items(out, {1,2,3}, 3)Expected result
3: 1 2 3Expected files
stash.cAllowed functions
None. Write every helper yourself.
