6 kyu
Get All Possible Anagrams from a Hash
405 of 698Mackay
Description:
Given a hash of letters and the number of times they occur, recreate all of the possible anagram combinations that could be created using all of the letters, sorted alphabetically.
The inputs will never include numbers, spaces or any special characters, only lowercase letters a-z.
E.g. get_words({2=>["a"], 1=>["b", "c"]}) => ["aabc", "aacb", "abac", "abca", "acab", "acba", "baac", "baca", "bcaa", "caab", "caba", "cbaa"]
Puzzles
Similar Kata:
Stats:
Created | Oct 15, 2014 |
Published | Oct 15, 2014 |
Warriors Trained | 1718 |
Total Skips | 460 |
Total Code Submissions | 2855 |
Total Times Completed | 698 |
Ruby Completions | 175 |
Python Completions | 405 |
JavaScript Completions | 146 |
Total Stars | 39 |
% of votes with a positive feedback rating | 95% of 160 |
Total "Very Satisfied" Votes | 144 |
Total "Somewhat Satisfied" Votes | 15 |
Total "Not Satisfied" Votes | 1 |