Leetcode 2000. Reverse Prefix of Word
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.