bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
EasyArrays & HashingLC 1189

Maximum Number of Balloons

Given a string text, you want to use the characters of text to form as many instances of the word "balloon " as possible. You can use each character in text at most once. Return the maximum number of instances that can be formed.

Asked at 2 companies
TeslaWayfair
Hints
  • 1.Think about which data structure fits best
  • 2.Consider the time complexity of your approach
  • 3.Look for patterns in the constraints
LeetCode