Tap here to switch tabs
Problem
Submissions

Problem: Minimum Number of Steps to Make Two Strings Anagram

med
30 min
Try to solve the Minimum Number of Steps to Make Two Strings Anagram problem.

Statement

Given two strings s and t of equal length, you may perform the following operation on t any number of times: choose an index in t and replace the character at that index with any lowercase English letter.

Return the minimum number of operations required to make t an anagram of s.

Note: An anagram is a rearrangement of characters that results in the same character counts for each letter.

Constraints:

  • 1≤1 \leq s.length ≤5⋅104\leq 5 \cdot 10^4

  • s.length ==== t.length

  • s and t consist of lowercase English letters only.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimum Number of Steps to Make Two Strings Anagram

med
30 min
Try to solve the Minimum Number of Steps to Make Two Strings Anagram problem.

Statement

Given two strings s and t of equal length, you may perform the following operation on t any number of times: choose an index in t and replace the character at that index with any lowercase English letter.

Return the minimum number of operations required to make t an anagram of s.

Note: An anagram is a rearrangement of characters that results in the same character counts for each letter.

Constraints:

  • 1≤1 \leq s.length ≤5⋅104\leq 5 \cdot 10^4

  • s.length ==== t.length

  • s and t consist of lowercase English letters only.