Computers and Technology

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

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 15:20, headshotplayzcod
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
image
Computers and Technology, 23.06.2019 22:00, bb1593
Jackson, who works in the finance department of a company, is holding a seminar for other employees on how to file taxes. only three employees sign up to attend the seminar. which device can he use to share his presentation with a group of three employees?
Answers: 1
image
Computers and Technology, 24.06.2019 10:50, latresyn
In 2009 to 2010, how many social network users were reported as being victims of online abuse? a. 1 in 10 b. 100% c.1 in 100 d. 50%
Answers: 2
image
Computers and Technology, 24.06.2019 23:00, person76
Systolic pressure is a measure of blood pressure when the ventricles relax and fil with blood ture or false
Answers: 1
Do you know the correct answer?
Write a function: string solution(string &S, string &T): That given two strings S and T, Con...

Questions in other subjects:

Konu
English, 14.01.2020 19:31