subject

For this project, you have to write 3 functions. C++ 1. remove_adjacent_digits. This takes in 2 arguments, a std::vector, and a std::vector of the same size. You need to return a std::vector, where each of the strings no longer has any digits that are equal to, one more, or one less, than the corresponding integer in the 2nd vector.

2. sort_by_internal_numbers. This takes in a single argument, a std::vector, and you need to return a std::vector, which is sorted as if only the digits of each string is used to make a number.

3. sort_by_length_2nd_last_digit. This takes in a std::vector>. It returns a vector of the same type as the input, which is sorted, first by the length of the string in the pair, and if they are the same length, then the second last digit of the int.

See the test cases for examples of each of the above functions.

You need to submit a single file called main. cpp that contains all these functions. You can (and should) write additional functions as well. There is no need for a main function.

No loops (for, while, etc) are allowed. You must use only STL algorithms for this project.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:30
This technology is used to produce high-quality documents that look good on the computer screen and in print. wiki presentation paint desktop publishing
Answers: 3
question
Computers and Technology, 22.06.2019 21:30
How do you take a green screen out of the video while editing?
Answers: 2
question
Computers and Technology, 23.06.2019 00:00
What season was better from fortnite?
Answers: 2
question
Computers and Technology, 24.06.2019 05:30
Cómo pongo un tomo de llamada sin pagar?
Answers: 1
You know the right answer?
For this project, you have to write 3 functions. C++ 1. remove_adjacent_digits. This takes in 2 arg...
Questions
question
Mathematics, 19.03.2020 02:29
question
Mathematics, 19.03.2020 02:29
question
Chemistry, 19.03.2020 02:29
question
Mathematics, 19.03.2020 02:29
Questions on the website: 13722363