Tap here to switch tabs
Problem
Submissions

Problem: Rearrange Characters to Make Target String

med
30 min
Try to solve the Rearrange Characters to Make Target String problem.

Statement

You are given strings s and target. You can select characters from s and rearrange them to construct copies of target.

Return the maximum number of copies of target that can be formed when each character in s is used at most 11 time.

Constraints:

  • 1≤1 \leq s.length ≤100\leq 100

  • 1≤1 \leq target.length ≤10\leq 10

  • s and target consist of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Rearrange Characters to Make Target String

med
30 min
Try to solve the Rearrange Characters to Make Target String problem.

Statement

You are given strings s and target. You can select characters from s and rearrange them to construct copies of target.

Return the maximum number of copies of target that can be formed when each character in s is used at most 11 time.

Constraints:

  • 1≤1 \leq s.length ≤100\leq 100

  • 1≤1 \leq target.length ≤10\leq 10

  • s and target consist of lowercase English letters.