Sum of Unique Values

L2 Easy Arrays & Hashing
Concept
Two passes over the same data are perfectly normal: count everything first, then use the counts to classify values.
Add together every integer in nums that appears exactly once. Values that repeat contribute nothing. If nothing qualifies, return 0.
Examples
▸ nums = [1, 2, 3, 2]
→ 4
▸ nums = [5, 5, 5]
→ 0
▸ nums = [1, 1, 2, 3]
→ 5
Progressive Hints
Hint 1 · Nudge
You can't know who's unique until you've seen everyone's count.
Hint 2 · Plan
First tally every value. Then add up only the keys whose tally is exactly 1 and return the sum, which is 0 when nothing qualifies.
Hint 3 · Approach
counts = frequency map. total = 0. For each key whose tally equals 1: total = total + key. Return total.
Output
// Run your code to see the output here.