Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Random tests in Haskell generate inputs inefficiently and the failure messages don't properly show the function arguments.
I've made a Haskell fork that fixes both of these issues.
The reference solution in Haskell also had some inefficiencies which might have slowed down testing even more. I've made a Haskell fork that improves the reference solution as well as removed the performance requirements.
+++
good
Done in this fork
I solved this kata. My solution passed all the tests. But I didn't feel satisfied. Something haunted me. Suddenly I understand a problem! In my first solution I wrote condition: else: min_red == min_black
return "No points scored".Do not take into account the rest of the throws,can give a wrong result. I have got a shok! I write another solution.I want to draw the attention of the author at this moment and so that he will revise the tests.But I really liked the kata!
This comment is hidden because it contains spoiler information about the solution
Done for Ruby, in this fork
Done in this fork
that's a good way to do it, thanks i learned something!
LoL, this is mega beautiful and laconic, I would never have thought of this myself 🙃
Forked & Approved
By using namespace std, you don't have to keep defining the "std::" prefix, so you can use "string" instead of "std::string" for the return value of the function.
It's generally not a good habit to use the entire std namespace, but in this specific case, it would have been better to replace "using namespace std;" with "using std::string;".
It's been three years, but your code is incorrect. You currently return false for any job/candidate match where the job does not require all of the candidate's skills, which is backwards. The candidate needs to satisfy all of the job's requirements, but not all of the candidate's skills need to be utilized. Your code has other issues as well. There is no bug with the kata, although assertion messages should be improved.
That's the test setting the
idealYears
property of the job object to 10. The next line actually tests your function. Your function should returnfalse
for this test because at this point in the test, the job requires 10 years of coffeescript (or javascript with the substitution), but the candidate only has 3 years of experience. Currently, your function returnstrue
for this test, which is incorrect.Loading more items...