In as few bytes as possible, sort the input, a delimited string OR list/vector/array of words, words contain printable ASCII except space (ASCII values 33-126) into a numbered list, table, or something resembling a table, by length.
Table rules are as follows:
- Order is mandatory, direction is optional, either labelled rows from shortest to longest or vice versa,
- Formatting is not the challenge. So as long as the output is some form of numerically labelled rows of words, a numbered list, or a list of lists, or similar output, then it is a satisfactory answer.
- including/excluding gaps (NA values, see below examples for both methods of output)
- Word case is untouched. How the word appears in input should be shown in output.
Code Golf and Coding Challenges Meta
1. NA 2. NA 3. and 4. Code Golf Meta 5. NA 6. Coding 7. NA 8. NA 9. NA 10. Challenges
3. and 4. Code Golf Meta 6. Coding 10. Challenges
[[3, ['and']], [4, ['Code', 'Golf', 'Meta']], [6, ['Coding']], [10, ['Challenges']]]
My v3ry 3xc3113nt m0th3r ju5t 53rv3d u5 nin3 pizz@5 #JusticeForPluto
1. NA 2. My u5 3. NA 4. v3ry ju5t nin3 5. NA 6. m0th3r 53rv3d pizz@5 7. NA 8. NA 9. 3xc3113nt 10. NA 11. NA 12. NA 13. NA 14. NA 15. NA 16. #JusticeForPluto
2. My u5 4. v3ry ju5t nin3 6. m0th3r 53rv3d pizz@5 9. 3xc3113nt 16. #JusticeForPluto
[[2, ['My', 'u5']], [4, ['v3ry', 'ju5t', 'nin3']], [6, ['m0th3r', '53rv3d', 'pizz@5']], [9, ['3xc3113nt']], [16, ['#JusticeForPluto']]]
More examples can be provided if necessary but I think this should suffice for now. Please ask questions if you have them, this is my second attempt at a challenge. (the first failed dramatically)
@is part of a word, but
.is not, and
#is. Could you please define what a "word" means? Thanks. \$\endgroup\$