Premium problem120. Strip Prefixes and Map Categories to Codes

Medium Locked

ids is a string array like ["id_1", "id_2", ...] and letters is a parallel string array like ["A", "B", "C", ...]. Return a 2-column integer array where column 0 is ids with the "id_" characters stripped and converted to int, and column 1 is letters mapped A→1, B→2, C→3, D→4, E→5, F→6.

Input

ids = ['id_1' 'id_2' 'id_3']
letters = ['B' 'A' 'C']

Output

[[1 2]
 [2 1]
 [3 3]]

Premium problem

This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.

Implement solve(...)