Ad
  • Custom User Avatar

    Also, this would be a duplicate to many existing elementary DP (more specifically, coin change) katas, with a slight twist at the end.

  • Custom User Avatar

    Issues from the "harder" version of this kata also applies to this kata:


    Tests are unacceptable: the description says

    You are a baker that works in multiple stores, each store has a diferent number of oven types, some have ovens with 10 trays, others with just 4 trays, others with ovens with 4 trays and 10 trays (there are ovens with 1 tray up to 30).

    but the actual tests only contains at most 2 trays, which becomes a much easier problem.

  • Custom User Avatar

    Also, this would be a duplicate to many existing elementary DP (more specifically, coin change) katas, with a slight twist at the end.

  • Custom User Avatar

    Anyways, even the tests are unacceptable: the description says

    You are a baker that works in multiple stores, each store has a diferent number of oven types, some have ovens with 10 trays, others with just 4 trays, others with ovens with 4 trays and 10 trays (there are ovens with 1 tray up to 30).

    but the actual tests only contains at most 2 trays, which becomes a much easier problem.

    Similarly, random tests is a complete joke: It only tests [4, 10] against a multiple of 10, which has a trivial solution.

  • Custom User Avatar

    There is a dick move: random tests are secretly testing runtime each run and asserts that it does not exceed a certain value, with no indication this is being tested:

    Test Failed
      Expected: less than or equal to 20
      But was:  75
    
  • Custom User Avatar

    This kata needs random tests.

  • Custom User Avatar

    the idea is that since there is nothing else, you cant tell if its a - or a . (because you have nothing to compare to) so by default you need to assume its a .

  • Custom User Avatar

    https://www.codewars.com/kata/5300901726d12b80e8000498

    Yours is actually a simpler version of FizzBuzz (so the dificulty should be ajusted)

    (btw you can search for keywords in the kata pages to look for puzzles that might be similar to yours or to find more FizzBuzz puzzles)

  • Custom User Avatar

    It's just a simple recursion

  • Custom User Avatar

    btw what algorithm is your brute force solution based? (it performs really really well compared with my brute force solution for the previous kata, mine took minutes yours takes 100ms to solve for 1000 trays)

  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar

    Needs Random Tests.

  • Custom User Avatar

    so that generationg all possibilities is not possible

    Tests should be revamped to prevent brute force solutions directly copied from the last one