Practice ยท 1 of 3
Stock ledger
Implement static int totalQuantity(java.util.List<Integer> quantities) (sum of a List โ generics in action) and static java.util.Map<String, Integer> mergeStock(java.util.Map<String, Integer> a, java.util.Map<String, Integer> b) returning a NEW map with quantities summed per key.
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: Practice: Collections at Work