Practice Can Convert String in K Moves
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Determine whether s can become t using at most k numbered moves. During move i, either do nothing or choose one position never chosen before and shift its letter forward i times in the alphabet, wrapping z to a. Every position may be selected at most once, and moves are numbered from 1 through k. Return whether the transformation is possible.
Source: Can Convert String in K Moves on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
s = "input", t = "ouput", k = 9
true
# Example 2
s = "abc", t = "bcd", k = 10
false
# Example 3
s = "aab", t = "bbb", k = 27
true
Constraints
Related LeetCode Problems
Practice more problems similar to Can Convert String in K Moves.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.