Available question text
Find the first occurrence of character ch in word and reverse the prefix from index 0 up to that occurrence (inclusive), returning the modified string; if ch isn't found, return the original word.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2000. Reverse Prefix of Word
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source