Question: C++ Programming Write a function that determines if two strings are anagrams. The function should not be case sensitive and should disregard any punctuation or

C++ Programming

C++ Programming Write a function that determines if two strings are anagrams.

The function should not be case sensitive and should disregard any punctuation

Write a function that determines if two strings are anagrams. The function should not be case sensitive and should disregard any punctuation or spaces. Two strings are anagrams if the letters can be rearranged to form each other. For example, "Eleven plus two" is an anagram of Twelve plus one". Each string contains one "v", three "e's", two "l's", etc... Test your function with several strings that are anagrams and non-anagrams. You may use either the string class or a C-style string Hint: Count the number of each letter for the two strings and compare the two "histograms". Hint: Use an array of size 26 for the histogram. If two strings entered are "eleven plus two" and "twelve plus one Enter two strings. They are anagrams If two strings entered are "Go Pokes" and "Go Sooners Enter two strings. They are not anagrams

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!