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, 22.06.2019 00:00
11. is the ability to understand how another person is feeling. a. authority b. sympathy c. empathy d. taking a stand
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
How does a policy manual an organization? a. it boost productivity. b. it create awareness in employees about the organization’s values. c. it employees achieve targets. d. it safeguards the organization from liabilities.
Answers: 1
question
Computers and Technology, 22.06.2019 11:10
Look at the far left lane in the picture. explain what the red car is doing and what it needs to do to travel safely.
Answers: 2
question
Computers and Technology, 23.06.2019 05:00
Which best explains why a digital leader would join a society specializing in technology
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
Physics, 19.01.2020 19:31
question
Mathematics, 19.01.2020 19:31
Questions on the website: 13722361