Two words are considered anagrams if one can be formed by rearranging the letters of the other. For example, 'Silent' is an anagram of 'Listen,' as the letters of 'Listen' can be rearranged to form 'Silent'. Write a lambda function to determine if a word is anagram of another or not. The lambda function should return True if the words are anagrams and False otherwise.
Lambda functions
Anagram
Report a typo
Sample Input 1:
listen
silentSample Output 1:
AnagramsWrite a program in C++
// Lambda to check anagrams
auto checkAreAnagrams {[](std::string firstWord, std::string secondWord) -> bool { // Please don't modify this
// Your code here
}};
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.