Ad
  • Custom User Avatar

    Well this is a from an older book and A-z is not meant in ASCII meaning. But, yes, together with rhe regex course might be confusing. I'm going to rewrite.

  • Custom User Avatar
    • I can add random tests, why not. I did not think of them as a necessity.
    • The trivial regex katas - to be honest, as a teacher I have a specific need of PHP katas (excercises, whatever) that really are simple and can create a "full chain" of excercises that walk the user through the basics of regex. I did not find many fitting here.
  • Custom User Avatar

    data = [1, 1, 0, 1, 3, 2, 6], binWidth = 2. This means that all zeroes and ones fall to the first bin (it starts with 0 and has width 2) which gives four elements (1,1,0,1). The next bin is for twos and threes - there are two of them (3, 2) etc.

  • Custom User Avatar

    Thank you, I tried to reformulate the description (and correct mistakes). It's funny that this kata I made some 3 years ago and had no attendance since, is now active.

  • Custom User Avatar

    That depends on the view of what is the best solution. However, in most computer algorithms the best solution (out of all that give correct results) the best is where is minimum used memory & CPU time. This is a solution in constant time because there was a previous analysis with pen & paper. That is what I call a real optimization - the author found a way of different solving of the same problem using less resources.

  • Custom User Avatar

    I really like this Kata, even though I am unsure that this is a real 1kyu. I was surprised that my (mapless) solution to 4x4 did pass this 6x6.

    To make it real 1kyu, I think that the solution should also handle cases of "not enough clues to solve" and "invalid clues combination".

  • Default User Avatar

    For a strange reason I see your solution as only partial. However, I am not sure, if it is OK to return the input datau in case it is empty on first row. I believe C# considers array to be a reference-type, so you are returning the very same array as got into the method which might in real usage cause confusion and/or bugs. I believe a new empty array should be returned.

  • Default User Avatar

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

  • Default User Avatar

    The break inside the for loop is an applied covnergence criterium (very weak) - if all the remaining elements were of same value, they won't change the sixth decimal digit when added together.

  • Custom User Avatar

    The C# kata has a bug - a mismatch between class name in Kata (class SmallestIntegerFinder) and in tests (class Kata) Error: Command failed: /tmp/csharp11597-20-nq18lb/fixture.cs(11,16): error CS0103: The name `Kata' does not exist in the current context )

  • Default User Avatar

    Hey man, this is cheating

  • Default User Avatar

    The C# version is missing the e.g. example

  • Default User Avatar

    The sytax error is back again

  • Custom User Avatar

    The task is easier than the setup text.

  • Default User Avatar

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

  • Loading more items...