• Custom User Avatar

    Thank you very much. I have found a nice Linq solution with SingleOrDefault()

  • Custom User Avatar

    the random tests in C# were producing strings that did not conform to the specification: the matrix could have different characters (besides '*') in the same column. My guess is that nobody noticed it until now because most solvers looped from top row to bottom row and exited as soon as a non-'*' was found.

    I fixed the C# RNG, and I also added nicer assertion messages that display the input. Your code passes the random tests now. It still fails the edge cases test (empty arrays / empty strings), but that should be an easy fix.

  • Custom User Avatar

    (csharp)I can't find out why the result for this input:

    copies=*v*l****, ***l]*W*, +vg*]WWN, +*g****N, *WYhDw*d, 8WYhD*Y*, *WY*Dw*d, 8WYhD*Yd, 8WYh*wYd
    

    should be:

    +vgl]WWN
    

    notice: some strings start with '+' und some strings start with '8' and some with '*'

    Can someone help me please?

  • Custom User Avatar

    I don't think this is an Issue, since the solution to any kata can be found on the Internet.

    When kata authoring is done right, you have a unique problem. Neither the internet nor an AI will know what to do with your kata.

  • Custom User Avatar

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

  • Custom User Avatar
  • Custom User Avatar

    at the end of your for loop, what value does j have ? is it the correct index to nul terminate ? also, notice the warnings:

    memset(assembled, '\0', sizeof(assembled));
           ~~~~~~~~~               ^~~~~~~~~
    /*
    solution.c:9:34:
    
    warning: 'memset' call operates on objects of type 'char' while the size is based on a different type 'char *' [-Wsizeof-pointer-memaccess]
    note: did you mean to provide an explicit length?
    */
    
  • Custom User Avatar

    😂😂😅

  • Custom User Avatar

    (c#): IMHO the example test has still the typo:
    Assert.AreEqual("abcde", Kata.Assemble(new string[] {"abcde","abcde","abcbe"}));

  • Custom User Avatar

    c# tests give growing input? every next test is previous+newtest. last test already has 200 lines (all previous lines together)

    [Y
    y
    Y
    ysY
    ys
    Y
    y*[*

    [Y
    y
    Y
    ysY
    ys
    Y
    y*[*
    PdqTq
    PdqTq
    dqTq
    P
    qTq
    Pdq**

    [Y
    y
    Y
    ysY
    ys
    Y
    y*[*
    PdqTq
    PdqTq
    dqTq
    P
    qTq
    Pdq**
    9Mccp
    9McW
    Tcp
    MWJTcp
    9M
    WJ
    *p
    9McJTp

    [Y
    y
    Y
    ysY
    ys
    Y
    y*[*
    PdqTq
    PdqTq
    dqTq
    P
    qTq
    Pdq**
    9Mccp
    9McW
    Tcp
    MWJTcp
    9M
    WJ
    *p
    9McJTp
    2XNs
    *2X's
    D
    X'*s
    D2X's
    D2
    'Ns

    etc.

  • Custom User Avatar

    Approved

  • Custom User Avatar

    Approved

  • Custom User Avatar

    Approved

  • Custom User Avatar

    Can't to approve due to a conflict in the description.
    Forks with the correct description for COBOL and Go.

  • Custom User Avatar

    Approved

  • Loading more items...