subject

Write a function: string solution(string &S, string &T): That given two strings S and T, Consisting of N and M characters, Respectively determines whether string T can be obtained from string S by at most one simple operation from the set specified below. The function should return a string: • "INSERT C" o If string T can be obtained from string S by inserting a single character "c" at the beginning of the string. "REMOVE C" o If string T can be obtained from string S by deleting a single character "c" from the end of the string. "SWAP cd" o If string T can be obtained from String S by swapping two adjacent characters "c" and "d" . These characters should be distinct and in the same order as in string S • exactly one swap is performed • "EQUAL" o If no operation is needed • Strings T and S are equal • "IMPOSSIBLE" o If none of the above works Note: characters "c" and "d" from operations above, mean any English alphabet lowercase letters

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:40
Match each feature of e-publishing as an advantage, a disadvantage, a threat, or an opportunity. (choices) increased collaboration digitalized out-of-print versions monopoly over digital formats requirement for a specialized digital device pairs advantage of e-publishing disadvantage of e- opportunity for e- threat to e-
Answers: 1
question
Computers and Technology, 22.06.2019 10:30
Auniversity wants to install a client-server network. which feature do you think is important for them as they set up the network? sending email blocking multiple people to use the same file low security low set up cost limited access to files
Answers: 1
question
Computers and Technology, 22.06.2019 22:20
Avariable of the data type arrays is storing 10 quantities. what is true about these quantities? a. the quantities all have different characteristics. b. the quantities all have the same characteristics. c. five quantities have the same and five have different characteristics. d. it is necessary for all quantities to be integers. e. it is necessary for all quantities to be characters.
Answers: 2
question
Computers and Technology, 23.06.2019 20:30
If an appliance consumes 500 w of power and is left on for 5 hours, how much energy is used over this time period? a. 2.5 kwh b. 25 kwh c. 250 kwh d. 2500 kwh
Answers: 1
You know the right answer?
Write a function: string solution(string &S, string &T): That given two strings S and T, Con...
Questions
question
Chemistry, 30.11.2019 14:31
question
Biology, 30.11.2019 14:31
Questions on the website: 13722363