Ad
  • Custom User Avatar

    Do not vandalize your own kata, even when it got retired.

  • Custom User Avatar

    You're right about all of this; I made this because I was bored in class and didn't really stop to think about anything. Thanks.

  • Custom User Avatar

    Issues:

    • 100k tests is overkill, and ~100 should be totally enough.
    • It is not clear if collinear points are a valid triangle. What is expected answer for [ [0, 0], [1, 1], [2, 2]]?
    • Text like "Code should identify invalid arrays." should be a title of a test case or a test group. Assertion message should present input of a failing test.
    • Tests should specify and validate requirements w.r.t. mutation of input array. In this problem it is not necessary to mutate the input to solve it, so I think that specifying mutation as forbidden (and enforcing this) would be a way to go.

    Suggestions:

    • (int) (Math.random() * 200) -100 is a really bad way if generating random numbers. There is Random::nextInt, there is Random::ints.
    • Solution class could use some less specific name than ForemanPig.
    • Logic for generating dupes seems very convoluted. It can be significantly simplified, and dupes should be guaranteed to occur in the test set, and not be present only by random chance.
  • Custom User Avatar
    • Messages are not formatted correctly:
    For input: [[I@1ffe63b9, [I@51e5fc98, [I@51e5fc98, [I@7c469c48] ==> expected: <true> but was: <false>
    
    • Only some tests attempt to present inputs, while some others do not.
  • Custom User Avatar

    I read the description a couple of times and I still have no idea what "ordered pairs" are, especially in context of triangles :thinking:

  • Custom User Avatar

    I edited the description; thank you.

  • Custom User Avatar

    A minor typo in the description:

    ... the 1st character of the ou[T]put is the average ...
    
  • Custom User Avatar

    looks good!

  • Custom User Avatar

    fixed, thanks!

  • Custom User Avatar

    Something seems off with the C random tests. For example:
    < Incorrect Result >

    code[13] = {
    " uhefkcy mrpdrk uflndjh em zzksswz acry",
    "x ogyypkkuvxpxfkajctamdsac uxqk lrsbp f",
    "z zwiousp vaozd tygmv wazgstvzx rpbsdnk",
    "lixlwoo mam oa ggrzui gtk k rnjcjrjy",
    "xvyb gbmlhwcaerzpart dfrjhmlrvinh pvfjz",
    "iqvljsba vrsv xl xw njhuq bdllcuuwxwnyw",
    "ns ffmvpake q kwnezyhakbq qwxfjplh qvc",
    "qfzpnf qabvstbmc bcexzj ucuolr fkov",
    "dphohc dqafvqwdpdpowlbd siowt kodkcemb ",
    " vepl st hkdi zt gi asvdvq rgvmjjpcuh",
    "xmhapp bamj muvhnko uu ywb ynvntvnhdu ",
    "eus uwg wmjkz xruttzjgmwy dyjwx ihzvdxa",
    "ticc ysrrdcpmhbbzhxpjm uu oqjhikkdkhoa"
    }

    Submitted: "mmnikmikghmlkkiklklpkiiimjeooolknlikiok"
    Expected: "i igh

    iiie
    i "

  • Custom User Avatar

    This was happening because you were mutating the input, which causes unexpected behavior. I have fixed the code so this will not happen any further. Please click RESET in your trainer (don't forget to copy your code if you don't want to lose what you do have), and you will notice that the declaration is now: void decipher(size_t length, const char * const code[length], char *mew).

    Thank you and good luck!

  • Custom User Avatar

    I get a SIGABRT with my code. Surely, my code is wrong but I do not allocate any memory so how is it possible?

    Besides, I'm seeing

    Expected: "*&ikh)ihg&j'kj%&hij'-&'*ih)h'"

    which should not be possible ("Every String consists of only lowercase letters and spaces.")

  • Custom User Avatar

    Thank you!

  • Custom User Avatar
  • Custom User Avatar

    ... Easy fix... =_=

    Thank you for bringing the issue to my attention, if it still doesn't work come yell at me

  • Loading more items...