package
0.0.0-20241102054555-b6e87e53946e
Repository: https://github.com/kotopheiop/gocodewarssolutions.git
Documentation: pkg.go.dev

# README

Find the unique number

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

FindUniq([]float32{1, 1, 1, 2, 1, 1}) == 2
FindUniq([]float32{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.

This is the first kata in series:

  1. Find the unique number (this kata)
  2. Find the unique string
  3. Find The Unique