Substringify
Given two lowercase alphabet strings s
and t
, return the minimum amount of operations on s
required to make t
a substring of s
. In each operation, you can choose any position in s
and change the character at that position to any other character.
Constraints
0 ≤ m ≤ n ≤ 100
wheren
is the length ofs
andm
is the length oft
https://binarysearch.com/problems/Substringify
Examples
Example 1
Input
- s =
foobar
- t =
oops
Output
- answer =
2
Explanation
We can take the substring "ooba"
and change 'b'
to 'p'
and 'a'
to 's'
.
Leave a comment