Skip to content

Commit

Permalink
Create 1189-Maximum-Number-of-Balloons.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sezanhaque committed Oct 28, 2022
1 parent 517b2e5 commit 2dbe5fe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/1189-Maximum-Number-of-Balloons.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from collections import Counter


class Solution:
def maxNumberOfBalloons(self, text: str) -> int:
count = Counter(text)
return min(count["b"], count["a"], count["l"] >> 1, count["o"] >> 1, count["n"])

0 comments on commit 2dbe5fe

Please sign in to comment.