TORONTO KIDS COMPUTER CLUB | Aurora Thursday Java 18:00 – 05.06
19410
post-template-default,single,single-post,postid-19410,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

Aurora Thursday Java 18:00 – 05.06

13 May Aurora Thursday Java 18:00 – 05.06

Question 1:
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.

Note
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.
No Comments

Sorry, the comment form is closed at this time.