Tap here to switch tabs
Problem
Submissions

Problem: Minimum Number of Steps to Make Two Strings Anagram II

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

Statement

You are given two strings s and t. In a single step, you can append any character to either s or t.

Return the minimum number of steps required to make s and t anagrams of each other.

Note: An anagram is a string that contains the same characters with the same frequencies as another string, but the order of characters can be different.

Constraints:

  • 1≤1 \leq s.length, t.length ≤2imes105\leq 2 imes 10^5

  • s and t consist of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimum Number of Steps to Make Two Strings Anagram II

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

Statement

You are given two strings s and t. In a single step, you can append any character to either s or t.

Return the minimum number of steps required to make s and t anagrams of each other.

Note: An anagram is a string that contains the same characters with the same frequencies as another string, but the order of characters can be different.

Constraints:

  • 1≤1 \leq s.length, t.length ≤2imes105\leq 2 imes 10^5

  • s and t consist of lowercase English letters.