Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function called isAnagram that takes two strings as arguments and returns a boolean true if the two strings are anagrams, otherwise it returns

Write a function called isAnagram that takes two strings as arguments and returns a boolean true if the two strings are anagrams, otherwise it returns false. Two strings are anagrams if the letters can be rearranged to form each other. You MUST use the C string library or string class functions to complete this code. (no sort functions)

MAKE SURE THE FUNCTION IS NOT CASE SENSITIVE AND SHOULD DISREGARD ANY PUNCTUATION OR SPACES.

#include

#include

#include

#include

using namespace std;

bool isAnagarm (string s1, string s2){

To test the code enter "Eleven plus two as string s1 and Twelve plus one as string s2. The function should return true.

Rats and Mice as string s1 and in cats dream as string s2 should also return true.

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

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions