Determine if two strings are anagram or not

Any word that exactly reproduces the letters in another order is an anagram. In other words, X and Y are anagrams if by rearranging the letters of X, we can get Y using all the original letters of X exactly once.

Given two strings, determine if they are anagrams or not. If they are, return true else, return false

Example Solution

When the solution is called with the following input str1 = 'the eyes' and str2 = 'they see', since these strings are anagrams, the solution should print true.

Contributed by Murat Sütunç