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
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console