Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2017 For Windows Web And Database Applications

Authors: Corinne Hoisington

1st Edition

1337102113, 978-1337102117

More Books

Students also viewed these Databases questions

Question

What is the difference between postponement and channel assembly?

Answered: 1 week ago

Question

Define Management by exception

Answered: 1 week ago

Question

Explain the importance of staffing in business organisations

Answered: 1 week ago

Question

What are the types of forms of communication ?

Answered: 1 week ago

Question

Explain the process of MBO

Answered: 1 week ago