0

How to write an anagram?

Maybe it's a basic thing, but I can't find information about it anywhere

18th Aug 2022, 11:31 AM
nadinchiksv
5 Respostas
+ 1
anagrams are words which have same character but in different positions and so forms different words .. so A string is said to be an anagram if it contains same characters and same length but in different order. Ex: abcd, acbd, adbc, dcba,.. all are anagrams formed with same letters a, b, c, d. For example: strings 'listen' and 'silent' anagrams...
18th Aug 2022, 11:35 AM
Jayakrishna 🇮🇳
+ 1
Okay, thanks for the answer, but I still don’t understand how to write code specifically
18th Aug 2022, 11:40 AM
nadinchiksv
+ 1
That's what you need to think about some logic.. You can think of permutations.. Or arrange sorted order of alphabets so they form same.. edit: oh what is that example about?
18th Aug 2022, 11:44 AM
Jayakrishna 🇮🇳
0
I need to write the code in such a way that the text «a1bcd efg! H» was displayed in the console as «d1cba hgf! E.» That is, to unfold everything and non-letter characters remain in place
18th Aug 2022, 11:43 AM
nadinchiksv
0
I suggest you write the algorithm in wording step by step here first, if your logic goes wrong, your coding would never be correct.
18th Aug 2022, 12:53 PM
abpatrick catkilltsoi
abpatrick catkilltsoi - avatar