Ad
  • Default User Avatar

    There is O(1) solution for two coins (with O(c) preparations, where c is value of greater coin).
    It also exists for three coins, but that's where calculations start getting... complicated.

  • Custom User Avatar

    I made another update to finally fix the last remanants of this testing error.

  • Default User Avatar

    When I was done whittling down the requirements, one of the randomly generated solutions spat out that it didn't expect a leading 'yī' character for a shí following a 'bǎi' character. Figured this may have been incorrect. Tried submitting again and it worked.

  • Default User Avatar

    I would prefer radix too.

  • Custom User Avatar

    Any variables declared with var are not properties and therefore are not able to be discovered by looping over the object's property names. This kata takes advantage of that, forcing you to brute force look for the variable.

  • Default User Avatar

    No problem. I hope you enjoyed solving my kata :)

  • Default User Avatar

    The return value of the deliverLine function is the deliverLine function, so (in my mind at least!) it's being called twice.

  • Custom User Avatar

    You are right, Nebril! I had missed that test case: The yi character is dropped only for values in the range [10-19], larger values will not drop the character. I have added two more test cases to verify that situation.

  • Custom User Avatar

    This is an intermittent issue that keeps popping up. We haven't gotten a chance to look at it yet. I re-validated all of the solutions and it looks like everything is good now.