Ad
  • Default User Avatar

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

  • Default 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.