Sum of Unique Elements

Easy
Arrays Array Hash Table

Return sum of elements that appear exactly once.

Constraints

1 ≤ len ≤ 100

Examples

Example 1:
Input: 1 2 3 2
Output: 4
Explanation: 1+3=4
Example 2:
Input: 1 1 1 1 1
Output: 0
▲ Console

Install Talent Arabia

Get instant access to jobs and career tools on your device.