anagram

Visto 17 veces
Saltar al primer mensaje no leído

aziz

no leída,
30 abr 2020, 7:08:5030/4/20
a Racket Users
hello i need again your help i have an examen in one day i need to understand this programme : Define an anagr function taking as a parameter a character string and returning the list of all anagrams of this string. We are not concerned in this question of whether an anagram appears several times or not in the result. We can do this in the following way: calculate all anagrams starting with the first character of the given string, then all those starting with the second character of the given string and so on. For example, this function could give the results following: (anagr "abc") returns' ("abc" "acb" "bac" "bca" "cab" "cba") and (anagr "aba") returns ("aba" "aab" "baa" "baa "" aab "" aba "). i have an idea : isolated the first character then calculate the anagrams of the remaining strings then with the second character and so on
But i don't know how make this exercise please
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos