Cody

Problem 288. Construct a string from letters and counts

Created by Alex Feinman in Community

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'.

Solution Stats

34.55% Correct | 65.45% Incorrect
Last solution submitted on Apr 02, 2019

Problem Comments

Recent Solvers112

Suggested Problems

More from this Author3