Leetcode 2027. Minimum Moves to Convert String
Given a string of 'X' and 'O', compute the minimum number of operations (each converts any chosen length-3 contiguous substring to 'O') needed to turn all characters to 'O'. This is equivalent to covering all 'X' positions with the fewest length-3 windows — a simple greedy/interval-covering problem.
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.