Question: Given two strings a and b, return a new string, following the rules given below. If string b occurs in string a, then the

Given two strings a and b, return a new string, following the rules given below. If string b occurs in string a, then the new string should concatenate the characters that appear before and after of String b. Ignore cases where there is no character before or after the word, and a character may be included twice if it is in between two string b's. Example1) i/p: abcXY123XYijk, XY o/p:c13i Example2) i/p:XY123XY, XY o/p:13 Example3) i/p:XY1XY, XY o/p:11
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
