Available question text
Process the string in 2k-sized blocks and reverse the first k characters of each block. If fewer than k characters remain, reverse all of them; if between k and 2k remain, reverse only the first k and leave the rest.
Related questions
Continue with questions that share topics or the same question type.
- Existence of a Substring in a String and Its Reverse
Coding
- Reverse Degree of a String
Coding
- Reverse String
Coding · String · Two Pointers
- Reverse Vowels of a String
Coding
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 541. Reverse String II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source