Checking if 2 given strings are anagrams or not is one of the most common and easiest interview questions which is often asked in interview coding rounds. In this post we discuss method to identify if 2 strings are anagrams or not. 2 strings or words or phrases are said to be Anagrams if they are formed by rearrangement of same letters. For example we consider "HOST" and "SHOT" they are formed by rearrangement of letters H,O,S,T. We can find a lot of such examples. Let us now discuss the method to check if 2 strings are anagrams. First we remove all the white spaces from the given strings. For strings to be anagrams the length of the strings after removing white spaces must be same, so we compare lengths. if the lengths are equal then we move forward. else we stop as the length of the strings must be same. The next step is to convert the string to lowercase, this step is optional and you can choose not to do it depending on your requirement. Then ...