13 May Aurora Thursday Java 18:00 – 05.06
Posted at 01:13h in Uncategorized 0 Comments
Given two strings, check if two strings are anagrams of each other
An anagram is a word, phrase, or name formed by rearranging the letters of another, such as cinema, formed from iceman.
Print True, if two strings are anagrams of each other otherwise print False.
Please use a HashMap to solve this question.
Sample Execution 1 Input String one: abode String two: adobe Output True Explanation: abode and adobe have the same characters, which is why they are anagrams of each other Sample Execution 2 Input String one: apple String two: aple Output False Explanation: Both apple and aple are not anagrams of each other. Even though they have the same character, the quantity is different.
Sorry, the comment form is closed at this time.