2007 Canadian Computing Competition, Stage 1
Problem J4: Anagram Checker
An anagram is a word or a phrase formed by rearranging the letters of another phrase such as “ITEM” and “TIME”. Anagrams may be several words long such as “CS AT WATERLOO” and “COOL AS WET ART”. Note that two phrases may be anagrams of each other even if each phrase has a different number of words (as in the previous example). Write a program to determine if two phrases are anagrams of each other.
The program should input two phrases, each entered on a separate line. You may assume that the input only contains upper case letters and spaces.
The program will print out one of two statements: ”Is an anagram.” or ”Is not an anagram.”
CS AT WATERLOO
COOL AS WET ART
Is an anagram.
Point Value: 5
Time Limit: 2.00s
Memory Limit: 16M
Added: Sep 30, 2008
- String Manipulation
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3