6 kyu

Find the odd int

32,096 of 312,771rbuckley

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 Trained547927
Total Skips61953
Total Code Submissions833586
Total Times Completed312771
Java Completions32096
Haskell Completions2204
JavaScript Completions97138
Python Completions124668
Ruby Completions9271
TypeScript Completions5595
PHP Completions7338
C# Completions18073
F# Completions267
Clojure Completions609
NASM Completions83
CoffeeScript Completions44
Crystal Completions55
C++ Completions12758
Scala Completions842
Julia Completions184
Racket Completions96
Go Completions4321
Prolog Completions40
Elixir Completions313
Pascal Completions53
Swift Completions1125
Groovy Completions69
C Completions2803
COBOL Completions18
D Completions20
Factor Completions11
Rust Completions802
Total Stars4971
% of votes with a positive feedback rating90% of 25389
Total "Very Satisfied" Votes20723
Total "Somewhat Satisfied" Votes4277
Total "Not Satisfied" Votes389
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