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.
passed it only after reading discussions.
to my mind description should mention:
What is going on here. I run into this a lot.
function runoff(voters){
var a= voters.length;
throws an error voters is not a function.
Please use a spoiler flag when you post code somewhere (I put the flag on for you). Raw code is not displayed properly in markdown, so please use markdown tags as explained there to format your code for it to be usable, as explained there: https://docs.codewars.com/training/troubleshooting/#post-discourse
This comment is hidden because it contains spoiler information about the solution
You need to return an object
For example the object of the first test will return { "a": 1}
At the beginning of the program start will an empty object e.g dict = {}
If the first command is mov a 5 (reg = a and val = 5)
then a code like this dict[reg] = dict[val] will set the object to { 'a': 5}
Hope this helps.
I agree! Adding 'Score of a word is sum of scores of its letters' would definitely help.
iirc if you link your github it takes the picture from that account.
This kata really interested me. I have it working, but I cant move my object array into a map. I am just not educated in map. It is frustrating to have the answer but not get it in the form the kata wants.
Isn't that my point? words and scores have nothing to do with each other and these are words yet you compare them to scores.
I can't follow your logic; "scores" and "words" have no natural connection. That said, maybe your difficulty lies in the term "order", which you introduced but is not present in the description. "Bath" is 'smaller' than "Cat" only if you consider lexicographic ordering, which is not asked for.
BTW how do I change my profile pic or is that detirmined by the web site?
While that is very natural to sport games, there is another way that is more natural to words. 'bath' is smaller than 'cat' using letter order but larger using only the sum. The instructions don't specify which method to use.
Honestly, I think that is self explanatory. In a football/soccer match, the highest scoring team is the team with the highest sum of individual goals. A goal is 1 point, so there is no other way to compare scores. How else would you interpret the question?
This comment is hidden because it contains spoiler information about the solution