You are given a string text that contains various characters.
Your goal is to determine how many complete copies of the word "balloon" can be constructed using those characters.
Each character from text can be used only one time, and the characters must match exactly the letters needed for the word "balloon".
Return the maximum number of full "balloon" words that can be formed.
Input: text = "bbaallooonnll"
Output: 1
Explanation:
Characters allow forming two full “bbaallooonnll” words.
Input: text = "balloonball"
Output: 1
Explanation:
There are enough characters for only one complete “balloon”.
Input: text = "xyzabc"
Output: 0
Explanation:
No required characters to form “balloon”.
Accepted:
Submission: