## The challenge

There is an array of strings. All strings contain similar letters except one. Try to find it!

 ``````1 2 `````` ``````find_uniq([ 'Aa', 'aaa', 'aaaaa', 'BbBb', 'Aaaa', 'AaAaAa', 'a' ]) # => 'BbBb' find_uniq([ 'abc', 'acb', 'bac', 'foo', 'bca', 'cab', 'cba' ]) # => 'foo' ``````

Strings may contain spaces. Spaces are not significant, only non-spaces symbols matter.
E.g. A string that contains only spaces is like an empty string.

It’s guaranteed that the array contains more than 3 strings.

## The solution in Python code

Option 1:

 ``````1 2 3 4 `````` ``````def find_uniq(arr): arr.sort(key=lambda x: x.lower()) arr1 = [set(i.lower()) for i in arr] return arr if arr1.count(arr1) == 1 and str(arr1) != 'set()' else arr[-1] ``````

Option 2:

 ``````1 2 3 4 5 6 `````` ``````def find_uniq(arr): for word in set(arr): for letter in set(word): if sum([1 if letter in w else 0 for w in arr]) == 1: return word else: continue ``````

Option 3:

 ``````1 2 3 4 `````` ``````from collections import Counter def find_uniq(arr): res = Counter(''.join(arr)).most_common() return ''.join([x for x in arr if res[-1] in x]) ``````

## Test cases to validate our solution

 ``````1 2 3 4 `````` ``````test.describe('should handle sample cases') test.assert_equals(find_uniq([ 'Aa', 'aaa', 'aaaaa', 'BbBb', 'Aaaa', 'AaAaAa', 'a' ]), 'BbBb') test.assert_equals(find_uniq([ 'abc', 'acb', 'bac', 'foo', 'bca', 'cab', 'cba' ]), 'foo') test.assert_equals(find_uniq([ ' ', 'a', ' ' ]), 'a') ``````