Ad
  • Custom User Avatar

    The sample test currently checks against 243.33000000000001d, not 243.33m.

  • Custom User Avatar

    Fixed typo, thx.

  • Custom User Avatar

    Small spelling fix: at the second line, fix "buting" to "buying".

    Also, not an issue per se, but I think it'll be good to add using System and/or using System.Linq to the initial code.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    I think you misunderstood the rules:

    when a customer buys three items of certain products, they get the cheapest item for free.

    Please note: cheapest item for free.
    The most expensive is not free, the supermarket is not charity ;-)

  • Custom User Avatar

    I feel like I am missing something. The kata states calculate discount so it works out best for customer (meaning biggest discount). This would imply that in a buy 2 get 1 free store and buying 15 items, the top 5 priciest items would be free. Yet, that doesnt appear to be what is expected.

    After a quick investigation, I dont know what this Kata is validating. Example:
    3 items in basket (13.95, 49.77, 35.82)

    I expect to discount the highest priced item (49.77) and the total would be 13.95 + 35.82 - which is 49.77. But this Kata is expected 85.59 - which is 49.77 + 35.82. This is the oppisite of the desired behavior.