Write a method to decide if two strings are anagrams or not.
Sample Input/Output:
first String: tea
second String: eat
Is Anagram: true
first String: teas
second String: seat
Is Anagram: true
first String: peas
second String: peat
Is Anagram: false
Sample Input/Output:
first String: tea
second String: eat
Is Anagram: true
first String: teas
second String: seat
Is Anagram: true
first String: peas
second String: peat
Is Anagram: false
No comments:
Post a Comment