Computer Science Canada comparing 2 strings |
Author: | HeavenAgain [ Tue Feb 27, 2007 11:32 pm ] |
Post subject: | comparing 2 strings |
umm this is a question straight from the junior question for the CCC is called anagram checker instructions are : input : the program should prompt the user for two phrases, each entered on a separate line. you may assume that the input only contains upper case letters and spaces. output: the program will print out one of the two statements :"is an anagram" or is not an anagram example would be "TIME" and "ITEM" or "CS AT WATERLOO" and "COOL AS WET ART" those 2 would be anagram, i'm assuming the spaces doesnt matter. i thought about this question and i used a hash map to solved it. but is there any other ways? |
Author: | Martin [ Wed Feb 28, 2007 12:39 am ] | ||
Post subject: | RE:comparing 2 strings | ||
Something like this:
|
Author: | haskell [ Wed Feb 28, 2007 6:03 am ] |
Post subject: | RE:comparing 2 strings |
Regular expressions anyone? |