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 would add more descriptive test cases result messages. I lost 20min not understanding the 4.5 case, test result description 'should return -1' I just didn't know what was the problem, wrong input should return empty array as it is written in the kata task. Message should tell me the test case and valid solution imho. for example 'Wrong result, 4.5 should return: []' instead of plain 'should return -1'. In JS there is only 'number' type not int or float. Had to add this specific check.
YI have spent a night thinking of it and you are totally right, I'll check if there is a way to implement TS type checking in tests. I'll start with translating other katas to TS and then redo this one, thank you. Ommiting types with any shouldn't be allowed.
Thnak you for feedack. Making a collection of creating Nodes, LinkedList and adding more methods/functionality to it would be a bad idea?
I was thinking about the same solution, but on every iteration you calculate calcValue(max). So I left the idea behind. althou I was thinking about passing object with { bestWord, bestScore }, but yea.. it think it would complicate readabilty.
Thanks, haven't thought about that.
Realy nice kata. Enjoyed it and learned someting about my programing language of choice. From both kata and solutions. Recomend to get to know ord() and chr().