#5. wordEnds
wordEnds
Background
Description
Given a string and a non-empty word string, return a string made of each char just before and just after every appearance of the word in the string. Ignore cases where there is no char before or after the word, and a char may be included twice if it is between two words.
Format
Input
Output
Samples
abcXY123XYijk" "XY
"c13i"
XY123XY" "XY
"13"
XY1XY" "XY
"11"
Limitation
1s, 1024KiB for each test case.