1. Anagrams!
by CodeChum Admin
Two strings are called anagrams, if they contain the same characters, but the order of the characters may be different.
Given a string consisting of lowercase letters and question marks, s1, and another string consisting of lowercase letters, s2, determine whether these two strings could become anagrams by replacing each ? character in s1 with a letter.
Input
1. First string
Constraints
Contains only lowercase letters and/or question marks
2. Second string
Constraints
Contains only lowercase letters
Output
The first line will contain a message prompt to input the first string.
The second line will contain a message prompt to input the second string.
The last line contains the message "anagram" if the strings could become anagrams by replacing all the ? characters of s1 with letters and "false" otherwise.
Comments
Leave a comment