Skip to main content
3 of 5
-1 byte, add explanation
Surculose Sputum
  • 8.4k
  • 1
  • 13
  • 40

Python 2, 95 71 70 bytes

lambda l,s:min(sum(s.count(c)for s in l)/s.count(c)for c in s if" "<c)

Try it online!

Input: A list of strings as ingredients l, and a string as the meal s.
Output: Max number of meals that can be made.

How: Divides the frequency of each character in the ingredient by its corresponding character in the meal, then take the minimum.

Surculose Sputum
  • 8.4k
  • 1
  • 13
  • 40