Old/Codewars

    6kyu - Find the unique number // Python

    6kyu - Find the unique number // Python

    문제 There is an array with some numbers. All numbers are equal except for one. Try to find it! find_uniq([ 1, 1, 1, 2, 1, 1 ]) == 2 find_uniq([ 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. 풀이 문제 조건에서 배열에 데이터가 많다고 했기 때문에 중복 값을 제거하는 것을 우선 순위로 생각했다. Python에서는 배열을 Set(중복된 값이 없는 자료형)으로 만드는 Method..