RosettaCodeData/Task/Isograms-and-heterograms/00-TASK.txt
2023-07-01 13:44:08 -04:00

38 lines
1.2 KiB
Text

;Definitions
For the purposes of this task, an '''isogram''' means a string where each character present is used the same number of times and an '''n-isogram''' means an isogram where each character present is used exactly '''n''' times.
A '''heterogram''' means a string in which no character occurs more than once. It follows that a '''heterogram''' is the same thing as a '''1-isogram'''.
;Examples
''caucasus'' is a '''2-isogram''' because the letters c, a, u and s all occur twice.
''atmospheric'' is a '''heterogram''' because all its letters are used once only.
;Task
Using '''[http://wiki.puzzlers.org/pub/wordlists/unixdict.txt unixdict.txt]''' and ignoring capitalization:
'''1)''' Find and display here all words which are '''n-isograms''' where '''n > 1'''.
Present the results as a single list but sorted as follows:
a. By decreasing order of '''n''';
b. Then by decreasing order of word length;
c. Then by ascending lexicographic order.
<br><br>
'''2)''' Secondly, find and display here all words which are '''heterograms''' and have more than '''10''' characters.
Again present the results as a single list but sorted as per b. and c. above.
;Reference
* [[wp:Heterogram_(literature)|Wikipedia: Heterogram]]
<br>
{{Template:Strings}}
<br>