7 kyu

Unique Anagrams

Description:

You will be given a list of words that are anagrams of each other. Your task is to find a unique anagram using the same letters - i.e. your result must be different to each word in the list.

Your result can be any valid answer, i.e. if there is more than one possible unused anagram, you may choose any of them to return.

If there is no valid answer, return an empty string.

Samples

INPUT  =>  OUTPUT
abcd, dbac, cbad  =>  dbca
12  =>  21
codewars, srawedoc  =>  edocraws
123, 132, 213, 231, 321, 312  =>  (empty string)
Strings
Permutations
Algorithms

More By Author:

Check out these other kata created by ArtOfCode

Stats:

CreatedNov 14, 2017
PublishedNov 14, 2017
Warriors Trained286
Total Skips5
Total Code Submissions387
Total Times Completed93
Ruby Completions93
Total Stars8
% of votes with a positive feedback rating84% of 47
Total "Very Satisfied" Votes34
Total "Somewhat Satisfied" Votes11
Total "Not Satisfied" Votes2
Total Rank Assessments4
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • ArtOfCode Avatar
  • Voile Avatar
Ad