Ad
  • Default User Avatar

    Thanks. I think I would have understood that if the question had written out the rest of the numbers instead of "etc..."😅

  • Default User Avatar

    Someone please help me understand this question. In the example it says the frequency is nine 1's, but then proceeds to show only six 1's in the test case solution. What the heck is this question asking me to do? Could someone please explain this... I'm wasting my time just trying to understand why the example is the correct solution.
    "The digit frequencies are 1 x 0, 9 x 1, 6 x 2 etc...

    and so the method would return [1,9,6,3,0,1,1,1,1,1]"
    This output only has six 1's, and no 2's instead of 9 and 6 respectively...what are we returning??

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    woops, replied to wrong comment, how to delete?

  • Default User Avatar

    Hi @neilm. If I pass in the array: sumOfDifferences([3,4,5,6,3]) it appears my solution gives a different answer than this solution code does. Which is returning the correct answer here and how, since both passed the testcases? Mine returns 3, his code returns 6 for the above sample

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Why did this kata mention 1.77 like it was important information to be used in the solution? At least I assumed it would be used. Of course, it didn't work when I tried math.round with 1.77 * y. The only answer I found online multiplied y by 1.77777 to get the answer, which is a hacky way of doing it. As a new coder, this one was a bad experience, the question is misleading. At 8kyu, we're still just trying to successfully apply the methods we're learning. Why stack deciphering a misleading question on top of that?

  • Default User Avatar

    How come you don't need to write return anywhere for this to work?
    With my solution without return statements it doesnt seem to work.