Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I submitted this solution by mistake (and it seems CodeWars doesn't allow deleting), it doesn't cover matrices that aren't squares, and it has a leftover console.log in the beginning... See my other solution for a correct version.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The test's description has a few English grammar mistakes.
add tests
This comment is hidden because it contains spoiler information about the solution
Thanks for responding anyways, first person to actually comment on anything I wrote / did on this site...
Cheers.
p.s.
sorry, haven't seen The IT Crowd, heard it's good.
Two requirments were unclear to me while solving this kata:
This is an interesting solution which would work for many cases, I like that the naming of the variables is very clear.
However, I think it will fail for larger numbers (e.g. a number starting with "MMMMMMM").
It's also inefficient in a few ways:
The RomanNumerals array is quite hard coded, I'd prefer that only the basic letter numbers will be hard coded ('M', 'C', 'D', etc.) and the possible combinations will be determined automatically.
This comment is hidden because it contains spoiler information about the solution
Happened to me too.
Took me a long time but I ended up realizing my code still wasn't efficient enough and fixed it.