Question: Given a string pathway with asteroids marked by asterisks ( ) and the closest nonasteroid character to its left. Example Process: For the input orif
Given a string pathway with asteroids marked by asterisks and the closest nonasteroid character to its left.
Example Process:
For the input "orifginnn
Shield at the st asteroid : removes and closest nonasteroid character to its left e Result: "origiinnn
Shield at the nd asteroid : removes and closest nonasteroid character to its left e Result: "originnn
Shield at the rd asteroid : removes
Shield at the last asteroid : removes and closest nonasteroid character to its left Result: "origin"
Input:
A string representing the pathway
Output:
A string representing the cleared pathway without any asteroids
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
