A bookseller has lots of books classified in 26 categories labeled A, B, ... Z. Each book has a code c of 3, 4, 5 or more capital letters. The 1st ...
For further actions, you may consider blocking this person and/or reporting abuse
JavaScript, with map ( for constant lookups )
Another F# one.
(But as I read it, the return value should be a string, not a list, and therefore a little input validation is needed to handle the input arrays being empty).
Scala
I was under a strong sleep deprivation when I wrote that solution, I think it can be done in a simpler way:
Haskell, quick and dirty.
Output:
In javascript
CodeSandbox example
Python, with a quick pytest:
Test: