6 kyu

Find the odd int

122,853 of 308,822rbuckley

Description:

Given an array of integers, find the one that appears an odd number of times.

There will always be only one integer that appears an odd number of times.

Examples

[7] should return 7, because it occurs 1 time (which is odd).
[0] should return 0, because it occurs 1 time (which is odd).
[1,1,2] should return 2, because it occurs 1 time (which is odd).
[0,1,0,1,0] should return 0, because it occurs 3 times (which is odd).
[1,2,2,3,3,3,4,3,3,3,2,2,1] should return 4, because it appears 1 time (which is odd).

Fundamentals

Stats:

CreatedFeb 10, 2015
PublishedFeb 10, 2015
Warriors Trained541883
Total Skips61552
Total Code Submissions826190
Total Times Completed308822
Java Completions31790
Haskell Completions2181
JavaScript Completions96037
Python Completions122853
Ruby Completions9216
TypeScript Completions5465
PHP Completions7283
C# Completions17907
F# Completions266
Clojure Completions604
NASM Completions80
CoffeeScript Completions44
Crystal Completions55
C++ Completions12580
Scala Completions837
Julia Completions183
Racket Completions92
Go Completions4220
Prolog Completions40
Elixir Completions309
Pascal Completions53
Swift Completions1103
Groovy Completions69
C Completions2741
COBOL Completions18
D Completions20
Factor Completions11
Rust Completions759
Total Stars4937
% of votes with a positive feedback rating90% of 25273
Total "Very Satisfied" Votes20625
Total "Somewhat Satisfied" Votes4264
Total "Not Satisfied" Votes384
Ad
Contributors
  • rbuckley Avatar
  • jhoffner Avatar
  • Abbe Avatar
  • bkaes Avatar
  • Unnamed Avatar
  • GiacomoSorbi Avatar
  • ChristianECooper Avatar
  • suic Avatar
  • anter69 Avatar
  • brunolm Avatar
  • jfhs Avatar
  • samhstn Avatar
  • Chrono79 Avatar
  • kazk Avatar
  • kleidemos Avatar
  • docgunthrop Avatar
  • Mazur213 Avatar
  • B1ts Avatar
  • Voile Avatar
  • metakata Avatar
  • mitron6 Avatar
  • Souzooka Avatar
  • 2Grey Avatar
  • andriyrom Avatar
  • hobovsky Avatar
  • ConstantineGochev Avatar
  • user3029010 Avatar
  • stellartux Avatar
  • trashy_incel Avatar
  • username0 Avatar
  • Wargrave Avatar
  • akar-0 Avatar
  • pastre Avatar
  • Kacarott Avatar
  • tri@ Avatar
  • Just4FunCoder Avatar
  • The43rdDev Avatar
Ad