I\'m stuck on this problem. Here is a picture of the problem statement:
The first method I thought of was just iterating over the string, skipping the ignored seg