Ad
  • Default User Avatar

    It's unclear from the description if min_price([1,x]) should return 0 or 1

  • Default User Avatar

    It shouldn't just be implied that any items in a store can be exactly valued by a combination of the coins. It needs to be explicitly stated or else the kata makes no sense.

  • Custom User Avatar
  • Custom User Avatar

    JS Translation (author not active)

  • Default User Avatar

    I feel like performance requirements should be clearly stated in advance. I had to fully rewrite code multiple times because each next set of hevier tests couldn't be completed with previous implementation. It was a fun challenge, even though it is a lot above my skill level!

  • Custom User Avatar

    .

  • Custom User Avatar

    Python 3.11 fork

    • Fixed test framework setup
    • Update to Python 3.11 (replaced deprecated function)
    • Added useful assertion message
    • Array tested in sample test are now tested in actual test as well
  • Custom User Avatar

    This kata should be ranked as 3 or even 2 kyu imo. The test cases make it way more challenging performance wise than what the description suggests. Additionally, it would be very helpful to include the harder test cases in the description.

  • Custom User Avatar

    No, I did not use this one. The one you linked describes Round Robin, the ones I used listed three or so other algorithms and did not involve round robin.
    I cannot find it now tho.

  • Custom User Avatar

    @hobovsky could you please share a link to those algorithms?

  • Custom User Avatar

    inefficient but readable. For readable improvement use stone.includes(curstone - 2) instead stones.indexOf(curstone-2) > -1

  • Default User Avatar

    Thanks for this! I'll have to have a look at those Zombie solutions that pass here.

  • Custom User Avatar

    I've tried some RR solutions from Zombie apocalypse kata here, and it managed to pass in ~10 seconds, so on a verge of timing out, but still doable. Maybe you need to improve your implementation?

    My solution is slightly faster than RR, runs in ~8.5s, and is based on another algorithm found in some scientific paper on the topic. The paper contained a couple of more algorithms, but I could not get them working, only the most basic one (but, apparently, still sometimes better than RR).

    Generally, there's quite a few materials and papers online with various approaches to the problem, up to some insanely high values (and equally insane algorithms).

    About ranks, you are right, they cannot be changed in an easy way. But since this kata has not many solutions yet, maybe something could be done. It would hjust have to be decided which kata shold be taken in what direction.

  • Custom User Avatar

    Wow, the optimization requirements are insane! The Round-Robin alogrithm doesn't work for this.. Can someone point me in the right direction (i.e. should I try to optimize the standard RR algorithm, or is there something else I ought to be googling for?)

    By the way, I don't know if kyu rankings can be changed post-factum, but, given that this is essentially the same problem (bar the optimization constraints) as the Zombie one https://www.codewars.com/kata/5d9b52214a336600216bbd0e/python, maybe this could be 3kyu (or the Zombie one 5 kyu)?

  • Custom User Avatar

    simple "return coins" takes 5 seconds, so we're left with 7 sec to run the solution
    perfect example of how potentially great kata is ruined by a couple of super experienced programmers who only think about themselves

  • Loading more items...