Complete the method isAnagram in the class Utils so that it returns true if the two string parameters are anagram* of each other.
*Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. For example, the word “Binary” is anagram of “Brainy”.
Public class Utils{
Public static Boolean isAnagram(String s1, String s2)
{
//write your code here
}
}
Public class Main{
Public static void main(String args[])
{
Challenge.isAnagram(“Brainy”, “Binary”);
Challenge.isAnagram(“tops”, “pops”);
}
}
No comments:
Post a Comment