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.
what do the generations represent ?
python new test framework
Python new test framework
Test coverage is very inefficient. Not only is the amount not up to par (only 4 random tests and 1 fixed test), such cases are not covered:
Names only consist of
[firstname] [lastname]
/[Last Name],[First Name]
which will invalidate this solutionNames only consist of
[First Name] [Middle Name] [Last Name]
which will invalidate this solutionNames only consist of
[Last Name],[First Name] [Middle Name]
which will invalidate this solutionNames only consist of
[First Name] [Middle Initial] [Last Name]
which will invalidate this solutionNames only consist of
[Last Name],[First Name] [Middle Name]
and[First Name] [Middle Initial] [Last Name]
which will invalidate this solutionI have yet to test other combinations of precedence rules, but I think the random tests should be setup to generate each ruleset in their corresponding groupings. (Links above may look similar, but they are not, any good souls who want to fix this kata may refer to this original solution that covers all cases and compare with above ones)
It is not clear from the description if
generations
can be0
, in which case the user would supposedly still have to trim the universe, i.e.should return
There is only 1 random test, which is not enough.
Also some usages of
Test.expect
do not give useful feedback.Then a customer with
balk = 0
will never enter the queue, because there cannot be-1
other customers in the queue; the tests actually exact the condition to be "greater than" instead of "not less than".Test needs to stop using global variables for variables used inside for loop, like
for(i=0; i<2; ++i){
.Every test case has customer arrival time in choronological order, so this part is pointless.
But putting that aside, this requirement is incompatible with the kata design: if there's a possibility that a new customer that arrives earlier than latest known arrival time arrives, then all existing calculations can always be invalidated. Calculations are only valid at the time
Report
is called. Therefore the kata shouldn't even allowArrival
to be added one at a time; it should only befunction DMVQueue(numServers, serviceTime, arrivalList)
with no superficial classes.This comment is hidden because it contains spoiler information about the solution
This is a duplicate of https://www.codewars.com/kata/58efb6ef0849132bf000008f
Instruction says "If there are no living cells, then return [[]]" yet in Haskell, the expected result in that case is [].
I am passing the sample test case, but failing when I attempt to solve this challenge.
I'd suggest that a more robust sample test case is added, that factors in things like having to crop around the living cells.
Even having the output of the attempt be a 2D array of 1's and 0's would be much better than the current html-ized version. It is needlessly cumbersome to count and type in the test arrays by hand.
If I am missing something, do correct me.
This comment is hidden because it contains spoiler information about the solution
the C prototype is bad :(
should be
sadly it cannot be fixed with backwards compatibility, because of the parameters order. lengths should always precede arrays, even when the compiler does not support C99.
Also, the conversion in the solution setup
is wrong, it should be
float (*w)[n][n]
why even pass
weights
asvoid*
if you need a cast to VLA type to write sensible code :(Loading more items...