balloon. The warehouse holds plastic letters, listed in the string letters: each character is one letter.
Each letter can go into only one sign. How many complete balloon signs can be assembled?letters="nobleballoonlo" → 1
There are two b, four l, four o and two n, but only one a, so just one sign can be made.
letters="llooaabbnnoolloo" → 2
Every letter is enough for two signs: two each of b, a, n, four l and six o.
letters="blown" → 0
There is no a, so not even one sign can be made.
letters consists of lowercase English lettersletters="nobleballoonlo"
1
Run checks the first 3 tests in your browser. Submit checks all 120 tests on the server, hidden ones included.