I have an array like:
[0,0,1,1,0,0,2,2,2,0...]
I have to pass for each element a letter in this form:
[A, B, C1, C2, D, E, F1, F2, F3, G...]
When the value is zero, or undefined or null need a new letter, otherwise need a new one again but as times as the same number stays there. There are two of 1 then I need C1, C2, later is there three of 2 so I need F three times.
Can you give me some hints to solve this issue?
[0, 0, 1, 1, 2, 2]? Do you start a new letter sequence for the2s or continue the old one?[C1, C2, F1, F1, F2, F2, ...]?Z?