0
How to write an anagram?
Maybe it's a basic thing, but I can't find information about it anywhere
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...
+ 1
Okay, thanks for the answer, but I still don’t understand how to write code specifically
+ 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?
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
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.