Skip to content

Commit

Permalink
Maximum Number of Balloons
Browse files Browse the repository at this point in the history
  • Loading branch information
nirmalnishant645 authored Jan 23, 2020
1 parent c7f4da0 commit 2cd537e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 1189-Maximum-Number-of-Ballons.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ def maxNumberOfBalloons(self, text: str) -> int:
d[i] = d.get(i, 0) + 1
d['l'], d['o'] = d.get('l', 0) // 2, d.get('o', 0) // 2
least = d['b']
for alpha, count in d.items():
for count in d.values():
least = count if count < least else least
return least

0 comments on commit 2cd537e

Please sign in to comment.