Expert academic support · 100% original work · 24/7 help 24/7 support: support@treatisely.com
Uncategorized

Write a function that, given two strings, determines if they contain exactly the

  • Posted
  • AuthoradminX
  • Length220 words
  • Reading time1 min

Write a function that, given two strings, determines if they contain exactly the same letters, including repetitions.
The parameters are const references, so if you want to use an algorithm that will modify a parameter you need to make a copy of it first.
We will only test your code on input strings consist of the lower case letters a-z. Let’s look at some examples.
On inputs “abc” and “cab”, the function should return true.
On inputs “aaa” and “aaaa”, the function should return false. The strings have to have the same letters including repetitions.
On inputs “aabbc” and “bacab”, the function should return true.
On inputs “cab” and “bab”, the function should return false.
Implement your solution in same_letters.cpp. Please do not alter the header file same_letters.hpp. The marker will only make use of these two files. I have given main.cpp with some test cases to get you started. You are free to modify main.cpp as you like for your own testing and debugging. I need the code to be tested against additional hidden test cases for a total of 20 test cases.
I NEED THE CODE TO RUN ON ED!
Also I’ve got three screenshots which contain 2 questions, which are multiple choice questions. Please provide the answer to them as well.

adminX

Subject expert at Treatisely.

Make your next academic task easier to manage

Tell us what you are working on and take the next step with Treatisely.

Submit your assignment free