#314. getSandwich
getSandwich
Background
Description
A sandwich is two pieces of bread with something in between. Return the string that is between the first and last appearance of "bread" in the given string, or return the empty string "" if there are not two pieces of bread.
Format
Input
Output
Samples
breadjambread
"jam"
xxbreadjambreadyy
"jam"
xxbreadyy
""
Limitation
1s, 1024KiB for each test case.