Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Count the frequency of each character in s and target.
Consider each letter one at a time. If there are x occurrences of a letter in s and y occurrences of the same letter in target, how many copies of this letter can we make?
We can make floor(x / y) copies of the letter.