Deviopath › Swift

Dictionary Lookup

Easy · Collections

dict[key] returns Int?. Use ?? 0 so a missing key becomes 0.

Write stockOf(_:_:) that returns the count for item.

Next: Unique Values