Code golf: find all anagrams

后端 未结 8 2157
再見小時候
再見小時候 2021-02-04 06:00

A word is an anagram if the letters in that word can be re-arranged to form a different word.

Task:

  • The shortest source code by character count to find

8条回答
  •  我寻月下人不归
    2021-02-04 06:18

    Perl, 59 characters

    chop,$_{join'',sort split//,lc}.="$_ "for<>;/ ./&&say for%_
    

    Note that this requires Perl 5.10 (for the say function).

提交回复
热议问题