Skip to content
Onsite

Map Characters

EasyP3Coding

Map the first num lower-case letters to 1, 2, 3, ...: a maps to 1, b to 2, and so on. Return the num pairs as strings of the form "<letter>-<value>", in alphabetical order. For num = 0 return an empty array.

Example 1

Input
num = 3
Output
["a-1","b-2","c-3"]

Example 2

Input
num = 1
Output
["a-1"]

Example 3

Input
num = 0
Output
[]

Constraints

  • 0 <= num <= 26

Hints

Run checks the 3 visible tests, Submit all 10.