2000. Reverse Prefix of Word
Problem Statement
Given a 0-indexed string word and a character ch, reverse the segment of word that starts at index 0 and ends at the index of the first occurrence of ch (inclusive). If the character ch does not exist in word, do nothing.
For examp...
outlierchronicles.hashnode.dev3 min read