katacoda

As a newbie I can't find the bug in the program

别来无恙 提交于 2020-06-29 06:42:24
问题 I was training a code wars kata and the kata was: In a factory a printer prints labels for boxes. For one kind of boxes the printer has to use colors which, for the sake of simplicity, are named with letters from a to m. The colors used by the printer are recorded in a control string. For example a "good" control string would be aaabbbbhaijjjm meaning that the printer used three times color a, four times color b, one time color h then one time color a... Sometimes there are problems: lack of