Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Problems Solving In Data Structures And Algorithms Using C++

Authors: Hemant Jain

2nd Edition

9356273170, 978-9356273177

More Books

Students also viewed these Programming questions

Question

How will you sort 1 PB numbers? 1 PB = 1000 TB.

Answered: 1 week ago