subject

Consider three strings instr1, instr2 and instr3 having only lowercase alphabets. Identify a string, outstr with the smallest possible length such that when strings instr1, outstr and instr2 are concatenated in the same order, instr3 becomes a substring of the concatenated string. Print the smallest possible length of (instr1 + outsrt + instr2) satisfying the given criteria. The string outstr can also be an empty string
Input format
The first, second and third line contain strings insrt1,instr2 and instr3 respectivley
Read the input from the standard input stream.
Output format
Print the smallest possible length of (instr1 + outstr + instr2) satisfying the given criteria.
Print the output to the standard output stream.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 10:40
Joe needs to see the slide transitions and animations he has applied to his slides in a large view. which presentation view should he use? in which tab would joe find the animations option to make further changes, if any?
Answers: 1
question
Computers and Technology, 24.06.2019 11:20
Print "censored" if userinput contains the word "darn", else print userinput. end with newline. ex: if userinput is "that darn cat.", then output is: censoredex: if userinput is "dang, that was scary! ", then output is: dang, that was scary! note: if the submitted code has an out-of-range access, the system will stop running the code after a few seconds, and report "program end never reached." the system doesn't print the test case that caused the reported message.#include #include using namespace std; int main() {string userinput; getline(cin, userinput); int ispresent = userinput.find("darn"); if (ispresent > 0){cout < < "censored" < < endl; /* your solution goes here */return 0; }
Answers: 3
question
Computers and Technology, 25.06.2019 03:40
Acurrent vehicle registration expires at of the first owner listed on the registration form. a. stretch and flex b. bend and break c. wear down d. bounce around
Answers: 1
question
Computers and Technology, 25.06.2019 06:30
How can u permanently delete a picture from your camera ?
Answers: 1
You know the right answer?
Consider three strings instr1, instr2 and instr3 having only lowercase alphabets. Identify a string,...
Questions
question
French, 14.10.2019 18:00
Questions on the website: 13722363