s
and t
are of the same length. If not, return False
.shifts
of size 26 to zero.s
and t
simultaneously.
a. Calculate the shift needed for s[i]
to become t[i]
.
b. Increment the corresponding counter in shifts
.shifts
array.
a. Calculate the maximum number of moves needed for each shift.
b. If the maximum moves exceed k
, return False
.True
.