#317. zipZap
zipZap
Background
Description
Look for patterns like "zip" and "zap" in the string -- length-3, starting with 'z' and ending with 'p'. Return a string where for all such words, the middle letter is gone, so "zipXzap" yields "zpXzp".
Format
Input
Output
Samples
zipXzap
"zpXzp"
zopzop
"zpzp"
zzzopzop
"zzzpzp"
Limitation
1s, 1024KiB for each test case.