Write a program to get two strings as input from the user. The program should check if both the strings contains the same letters.
It should check for both words with same length and different characters
Answers
Answered by
3
Explanation:
Write a function to check whether two given strings are anagram of each other or not. An anagram of a string is another string that contains same characters, only the order of characters can be different. For example, “abcd” and “dabc” are anagram of each other.
check-whether-two-strings-are-anagram-of-each-other
We strongly recommend that you click here and practice it, before moving on to the solution.
Method 1 (Use Sorting)
Sort both strings
Compare the sorted strings
Similar questions
Physics,
4 months ago
Computer Science,
4 months ago
Computer Science,
4 months ago
English,
9 months ago
Hindi,
1 year ago