7 kyu
Sum of array singles
4,547 of 14,556KenKamau
Description:
In this Kata, you will be given an array of numbers in which two numbers occur once and the rest occur only twice. Your task will be to return the sum of the numbers that occur only once.
For example, repeats([4,5,7,5,4,8]) = 15
because only the numbers 7
and 8
occur once, and their sum is 15
. Every other number occurs twice.
More examples in the test cases.
Good luck!
If you like this Kata, please try:
Algorithms
Similar Kata:
Stats:
Created | Oct 25, 2017 |
Published | Oct 25, 2017 |
Warriors Trained | 20889 |
Total Skips | 290 |
Total Code Submissions | 31123 |
Total Times Completed | 14556 |
Python Completions | 4547 |
JavaScript Completions | 5055 |
Ruby Completions | 419 |
R Completions | 142 |
C# Completions | 739 |
Haskell Completions | 143 |
C++ Completions | 2253 |
Rust Completions | 189 |
Factor Completions | 12 |
Java Completions | 1124 |
Clojure Completions | 27 |
Kotlin Completions | 346 |
Prolog Completions | 19 |
Total Stars | 175 |
% of votes with a positive feedback rating | 94% of 1784 |
Total "Very Satisfied" Votes | 1594 |
Total "Somewhat Satisfied" Votes | 168 |
Total "Not Satisfied" Votes | 22 |
Total Rank Assessments | 4 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |