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!"
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.
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.
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]
Not a kata issue!
Your code assumes all odd integers are primes, which is wrong
Your code returns
[]
for2
which is a prime itsdelfThis comment is hidden because it contains spoiler information about the solution
[Haskell fork]
The random tests were pretty weak (only testing numbers up to 100), and have been rewritten.
In Codewars, you can usually see the inputs by printing them out.
How can I see which input causes my solution to fail?
Solving a Kata
You can think of Hajime as something along the lines of "Let's start the exercise!"
Have thoughts...
Approved
Approved
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.
added random tests to Rust
Fixed JS.
Lua translation!
Reference solution was buggy and returned wrong expected result for integer=2. Should be fixed now.
Can you post your code, so i could use it to reproduce and fix the issue?
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]
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...