Problem 288. Construct a string from letters and counts

Created by Alex Feinman

Given two input arrays like this: [5,3,1] ['a','b','c']

Output a string that contains each letter the specified number of times, e.g.:

    'aaaaabbbc'

If given an invalid input (for example, a negative number), output the string 'ERROR'.

Problem Group

47 solvers submitted 195 solutions (4.15 solutions/solver).

Problem Comments

Solution Comments