Question: *C LANGUAGE* Let X,Y be two strings. We say X is an almost substring of Y if we can see X inside Y from left
*C LANGUAGE* Let X,Y be two strings. We say X is an almost substring of Y if we can see X inside Y from left to right but not necessarily in the consecutive order.
For example if X="ACGT" and Y="TACAGAAT" then X is an almost substring of Y. Look at coordinate 2,3,5,8 of Y.
If X="AT" and Y="TA" then X is NOT an almost substring of Y (because the ordering is wrong)
If X="ACGT" and Y= "ACGTA" then X is an almost substring of Y.
Write a program that reads two strings X,Y and decide whether X is an almost substring of Y.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
