Anagrams X42603


Statement
 

pdf   zip

html

Input

The input consists of two lines: - A first one with the original word. - A second one with the list of words to check for anagrams.

All inputs are always given in lower case.

Output

The output will be all the anagrams in the list, sorted by order of appearance.

Public test cases
  • Input

    abcd
    abdc cdab bace dacb abce
    

    Output

    abdc cdab dacb
    
  • Input

    codewars
    anagram warscode varscode warcodes rawcodes readcaos sweardoc
    

    Output

    warscode warcodes rawcodes sweardoc
    
  • Information
    Author
    HP CodeWars
    Language
    English
    Official solutions
    Python
    User solutions
    C++ Haskell Python