Skip to content
← Back to Community
5.8. Strings: Reverse fragment
Profile icon
pole55

"Given a string in which the letter h occurs at least twice, reverse the sequence of characters enclosed between the first and last occurrences of it."

Example input:
In the hole in the ground there lived a hobbit

Example output:
In th a devil ereht dnuorg eht ni eloh ehobbit

Voters
Profile icon
AliAlsadoon
Profile icon
shamaili
Profile icon
WyattKelton
Profile icon
hyming
Profile icon
YouhuiPang
Profile icon
JM10IW
Profile icon
Yaw_SnrSnr
Profile icon
tomsfy
Profile icon
yanachernova
Profile icon
pole55