Skip to content
Onsite

Map Character Again

EasyP3Coding

Map the 26 lower-case letters to consecutive integers: a maps to start, b to start + 1, and so on up to z. Return the 26 pairs as strings of the form "<letter>-<value>", in alphabetical order.

Example 1

Input
start = 3
Output
["a-3","b-4","c-5","d-6","e-7","f-8","g-9","h-10","i-11","j-12","k-13","l-14","m-15","n-16","o-17","p-18","q-19","r-20","s-21","t-22","u-23","v-24","w-25","x-26","y-27","z-28"]

Example 2

Input
start = 1
Output
["a-1","b-2","c-3","d-4","e-5","f-6","g-7","h-8","i-9","j-10","k-11","l-12","m-13","n-14","o-15","p-16","q-17","r-18","s-19","t-20","u-21","v-22","w-23","x-24","y-25","z-26"]

Example 3

Input
start = 0
Output
["a-0","b-1","c-2","d-3","e-4","f-5","g-6","h-7","i-8","j-9","k-10","l-11","m-12","n-13","o-14","p-15","q-16","r-17","s-18","t-19","u-20","v-21","w-22","x-23","y-24","z-25"]

Constraints

  • -1000 <= start <= 1000

Hints

Run checks the 3 visible tests, Submit all 10.