5 kyu

Find the unique string

2,493 of 6,007isqua

Description:

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

findUniq([ 'Aa', 'aaa', 'aaaaa', 'BbBb', 'Aaaa', 'AaAaAa', 'a' ]) === 'BbBb'
findUniq([ 'abc', 'acb', 'bac', 'foo', 'bca', 'cab', 'cba' ]) === 'foo'
find_uniq([ 'Aa', 'aaa', 'aaaaa', 'BbBb', 'Aaaa', 'AaAaAa', 'a' ]); // => 'BbBb'
find_uniq([ 'abc', 'acb', 'bac', 'foo', 'bca', 'cab', 'cba' ]); // => 'foo'
find_uniq([ 'Aa', 'aaa', 'aaaaa', 'BbBb', 'Aaaa', 'AaAaAa', 'a' ]) # => 'BbBb'
find_uniq([ 'abc', 'acb', 'bac', 'foo', 'bca', 'cab', 'cba' ]) # => 'foo'
      FindUniq([ 'Aa', 'aaa', 'aaaaa', 'BbBb', 'Aaaa', 'AaAaAa', 'a' ])
      * => result = 'BbBb'
      FindUniq([ 'abc', 'acb', 'bac', 'foo', 'bca', 'cab', 'cba' ])
      * => result = 'foo'

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

It’s guaranteed that array contains more than 2 strings.

This is the second kata in series:

  1. Find the unique number
  2. Find the unique string (this kata)
  3. Find The Unique
Fundamentals
Algorithms
Arrays
Strings

Stats:

CreatedDec 23, 2016
PublishedDec 23, 2016
Warriors Trained19133
Total Skips2399
Total Code Submissions67431
Total Times Completed6007
JavaScript Completions2493
TypeScript Completions464
PHP Completions369
Python Completions2773
COBOL Completions4
Total Stars641
% of votes with a positive feedback rating91% of 874
Total "Very Satisfied" Votes732
Total "Somewhat Satisfied" Votes120
Total "Not Satisfied" Votes22
Total Rank Assessments16
Average Assessed Rank
5 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • isqua Avatar
  • smile67 Avatar
  • kazk Avatar
  • akar-0 Avatar
  • dfhwze Avatar
  • farhanaditya Avatar
  • saudiGuy Avatar
Ad