Skip to content

Latest commit

 

History

History

find-the-unique-number-1

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

There is an array with some numbers. All numbers are equal except for one. Try to find it!

Kata.findUniq(new double[]{ 1, 1, 1, 2, 1, 1 }); // => 2
Kata.findUniq(new double[]{ 0, 0, 0.55, 0, 0 }); // => 0.55

It’s guaranteed that array contains at least 3 numbers.

The tests contain some very huge arrays, so think about performance.