Minimum String
You are given two strings s
and t
of equal length only consisting of lowercase letters. Assuming that you can first rearrange s
into any order, return the minimum number of changes needed to turn s
into t
.
Constraints
0 ≤ n ≤ 100,000
wheren
is the length ofs
andt
https://binarysearch.com/problems/Minimum-String
Examples
Example 1
Input
- s =
ehyoe
- t =
hello
Output
- answer =
2
Explanation
We can shuffle "ehyoe"
to be "heyeo"
and then turn "y"
and the 2nd "e"
into "l"
.
Leave a comment