• Custom User Avatar

    Not a kata issue!

    • Your code assumes all odd integers are primes, which is wrong

    • Your code returns [] for 2 which is a prime itsdelf

  • Custom User Avatar

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

  • Custom User Avatar

    [Haskell fork]

    The random tests were pretty weak (only testing numbers up to 100), and have been rewritten.

  • Custom User Avatar
    1. In Codewars, you can usually see the inputs by printing them out.

    2. Hajime is a verbal command used in various martial arts like Karate, Judo, and Kendo. It is given to start or mark the beginning of Kihon, Kata, Kumite or any other practices. It literally means “begin” or “let’s begin”. - Source

      You can think of Hajime as something along the lines of "Let's start the exercise!"

  • Custom User Avatar

    Have thoughts...

    1. I spent most of time figuring out what the tests were doing and what exactly my inputs were rather than solving the problem. Essentially, what the test taker needed to do, was a 7 kyu, readying the tests/inputes was not.
    2. I have no idea what "Hajime" is, but a DDG search seems to mean "Start"? But that is the end, when you already have your list.
  • Custom User Avatar

    Approved

  • Custom User Avatar

    Approved

  • Custom User Avatar

    I don't know math incredibly well, but I feel like this was really poorly worded. Wasn't sure what it wanted me to do for a while.

  • Custom User Avatar

    added random tests to Rust

  • Custom User Avatar

    Fixed JS.

  • Custom User Avatar
  • Custom User Avatar

    Reference solution was buggy and returned wrong expected result for integer=2. Should be fixed now.

  • Custom User Avatar

    Can you post your code, so i could use it to reproduce and fix the issue?

  • Custom User Avatar
    1) test random tests (TestFindTheDivisors)
         test/solution_test.exs:21
         Assertion with == failed
         code:  assert divisors(n) == check_divisors(n)
         left:  [1, 2]
         right: [2, 1]
         stacktrace:
           (elixir 1.15.7) lib/enum.ex:989: anonymous fn/3 in Enum.each/2
           (elixir 1.15.7) lib/enum.ex:4379: Enum.reduce_range/5
           (elixir 1.15.7) lib/enum.ex:2514: Enum.each/2
           test/solution_test.exs:22: (test)
    

    There is a problem with one assertion in the Elixir version.
    The exercise requires to return a sorted list, but it fails when it gets [1, 2] it is supposed to expect [2, 1]

  • Custom User Avatar

    How can this code be a best practice? It is at least twice as slow as the mathematical method of calculating the square root of a number

  • Loading more items...