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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Problems Solving In Data Structures And Algorithms Using C++
Authors: Hemant Jain
2nd Edition
9356273170, 978-9356273177
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App