Ad
  • Default User Avatar

    Not a kata issue~~

  • Custom User Avatar

    Then don't do it. The object is to develop an algorithm on your own without the use of what is commonly available. If you don't like, there are plenty of others out there that can entertain your fancy. No sense in being a baby and crying over it.

  • Default User Avatar

    read the directions more carefully. I made the same mistake.

  • Custom User Avatar

    Is not an issue. Different races have different value :) My bad.

  • Custom User Avatar

    Yes. Don't forget that races have different 'worth' :) You have it in the description.

  • Custom User Avatar

    1 0 0 0 1 0
    0 0 0 0 0 1 0
    Should be a tie???
    Why i keep having this error??

  • Custom User Avatar

    (~_) Thanks a lot.

  • Default User Avatar

    The inputs are not the worth. The inputs are the numbers of each race that are in the armies. You have to multiply the numbers times the worths that are given in the description. The worths always stay the same

  • Custom User Avatar

    I am not getting you,if I'm getting worth directly as input so why should I maintain history of any race to worth? I do not need it while calculating the result!

  • Default User Avatar

    on the good side you have 1 hobbit worth 1, and 1 eagle worth 4, for a total of 5
    on the evil side you have 1 troll worth 5.
    So both armies are worth 5

  • Default User Avatar

    You are not including the races worth in your solution anywhere. the inputs to the function is the sizes of each army but you need to combine that with each races worth to get the final outcome

  • Default User Avatar

    Good 1 0 0 0 1 0 Evil 0 0 0 0 0 1 0

    So why does it expects to be equal?

  • Default User Avatar

    The first test to fail will be the last test it will run so it is hard to say. I recomend you use console.log to print the inputs to the function to see for yourself what is being tested

    console.log(good);
    console.log(evil);
    
  • Default User Avatar

    What is Last TestCase?
    It always fails in my case.

  • Custom User Avatar

    If you read the last line of the description: "NOTE: reverse/reverse! have been disabled for String/Array and reverse() for JS. If you are chaining join after a reverse, you will get that error

  • Loading more items...