3135. Equalize Strings by Adding or Removing Characters at Ends
Given two strings
initialandtarget, your task is to modifyinitialby performing a series of operations to make it equal totarget.In one operation, you can add or remove one character only at the beginning or the end of the string
initial.Return the minimum number of operations required to transform
initialintotarget.
1 | class Solution { |