Question: Create a function unique_letters that returns the number of unique letters in an input string. The input to your function is the string S. You

Create a function unique_letters that returns the number of unique letters in an input string. The input to your function is the string S. You can assume this function is not case sensitive. For example, for the input string "abracadabra" the returning value is 5 as there remain five letters "abrcd" after filtering out repeated values.

 The function name and parameters are as follows: unsigned int unique_letters(const char *S);

Must be written in C++ and only include #include and

I only need the function because I'm submitting it to an autograder so if you want to write a name to test the function some test cases are

Problem 8

  • S = "xxXXXXxxxCCCCxxxx??ZZZZZxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" (return 3)
  • S = "12345////}}{}{" (return 0)
  • S = "aaaaaa" (return 1)
  • S = "a" (return 1)
  • S = "/" (return 0)
  • S = "ZZZZZZZZzzzzZZZZzzzAAAAaaaA12" (return 2)

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!