Available question text
Given a string over {a,b,c}, compute the minimum number of insertions needed to turn it into a concatenation of "abc" blocks by aligning its characters to the cyclic pattern "a"→"b"→"c". The core challenge is pattern matching against this fixed cycle — solvable by a simple greedy scan that counts missing letters for each expected position.
Related questions
Continue with questions that share topics or the same question type.
- Minimum Add to Make Parentheses Valid
Coding · Bracket Sequences · Greedy · Stack
- Minimum Adjacent Swaps to Make a Valid Array
Coding
- Minimum Changes To Make Alternating Binary String
Coding
- Minimum Cost to Make at Least One Valid Path in a Grid
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 2645. Minimum Additions to Make Valid String
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source