Implement a function to check if a given string is an anagram of another string.
Implement a function to check if a given string is an anagram of another string.
Student
I am Utpal Vishwas from Uttar Pradesh. Have completed my B. Tech. course from MNNIT campus Prayagraj in 2022. I have good knowledge of computer networking.
Sure, here is a C# function to check if a given string is an anagram of another string:
C#
This function will first check if the lengths of the two strings are not equal. If they are not equal, the function will return false. If the lengths of the two strings are equal, the function will then create a character array to store the characters of each string. The function will then sort the characters of each string. The function will then compare the sorted characters of the two strings. If the sorted characters of the two strings are equal, the function will return true. Otherwise, the function will return false.