Given a word list, find all sets of five words of five letters each, such that the words of each set have 25 distinct letters in total.
This challenge was inspired by this video by Matt Parker.
Testcases
Use this file if you want to test your code against the English vocabulary. Sample output sets:
["fjord", "vibex", "waltz", "nymph", "gucks"]
["fjord", "vibex", "waltz", "gymps", "chunk"]
Here's a shorter version of the same file, with only words of five letters and no repeated letters. Here's an even shorter version with just 2000 words.
Rules
- Standard I/O rules apply.
- Words contain only lowercase (or alternatively, uppercase) alphabetic characters.
- You can assume there are no empty words (i.e. words of length zero).
- The input can contain words that cannot belong to any set that satisfies the property, such as words with less than five letters, words with more than five letters, and words with repeated letters.
- You do not need to output every permutation of each valid set/list of five words.
- This is code-golf so the shortest code in bytes wins