Advertisement
kosievdmerwe

Untitled

Sep 13th, 2021
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. TARGET = "balloon"
  2.  
  3. class Solution:
  4.     def maxNumberOfBalloons(self, text: str) -> int:
  5.         c = Counter(text)
  6.         return min(
  7.             c[t_char] // t_cnt
  8.             for t_char, t_cnt in Counter(TARGET).items()
  9.         )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement