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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 01:00, kmsg2000
Program description: a c# app is to be created to produce morse code. the morse code assigns a series of dots and dashes to each letter of the alphabet, each digit, and a few special characters (such as period, comma, colon, and semicolon). in sound-oriented systems, the dot represents a short sound and the dash represents a long sound. separation between words is indicated by a space, or, quite simply, the absence of a dot or dash. in a sound-oriented system, a space is indicated by a short period of time during which no sound is transmitted. the international version of the morse code is stored in the data file morse. txt.
Answers: 3
image
Computers and Technology, 22.06.2019 09:30, relic7391
Is a string of code written to hurt others by damaging or destroying
Answers: 1
image
Computers and Technology, 22.06.2019 15:00, gmc2771
Hyperactive media sales has 10 windows 7 laptop computers used by sales-people in the organization. each laptop computer has several customized applications that are used during the sales process as well as customer relationship management software. all of the applications on the laptops are difficult to configure and have large data files. if all of the laptops have current hardware, what is the easiest way to install windows 10 on them?
Answers: 1
image
Computers and Technology, 23.06.2019 02:30, reyne36
Rafael needs to add a title row to a table that he has inserted in word. what should he do? use the alignment options. use the merge and center option for all the cells in the top row. use the merge and center option on the first two cells in the top row. none of the above
Answers: 3
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 in other subjects:

Konu
History, 07.12.2020 19:20
Konu
English, 07.12.2020 19:20
Konu
Mathematics, 07.12.2020 19:20