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:

Sum of prime-indexed elements

Sum of integer combinations

Algorithms

Stats:

CreatedOct 25, 2017
PublishedOct 25, 2017
Warriors Trained20889
Total Skips290
Total Code Submissions31123
Total Times Completed14556
Python Completions4547
JavaScript Completions5055
Ruby Completions419
R Completions142
C# Completions739
Haskell Completions143
C++ Completions2253
Rust Completions189
Factor Completions12
Java Completions1124
Clojure Completions27
Kotlin Completions346
Prolog Completions19
Total Stars175
% of votes with a positive feedback rating94% of 1784
Total "Very Satisfied" Votes1594
Total "Somewhat Satisfied" Votes168
Total "Not Satisfied" Votes22
Total Rank Assessments4
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • KenKamau Avatar
  • imjasonmiller Avatar
  • B1ts Avatar
  • Voile Avatar
  • Souzooka Avatar
  • mentalplex Avatar
  • rsa Avatar
  • metagn Avatar
  • booniepepper Avatar
  • hobovsky Avatar
  • Zordid Avatar
  • username0 Avatar
  • user8436785 Avatar
  • ejini战神 Avatar
  • Kacarott Avatar
  • saudiGuy Avatar
Ad