Ad
  • Default User Avatar

    @heptapod here is such a random test (each memory length is 100) for which your code returns 0 where instead it should return -1:

    alice = ["fans", "sick", "eave", "moos", "gown", "knit", "when", "sins", "miff", "jour", "balk", "duro", "swum", "aria", "eyas", "born", "waxy", "jolt", "aloe", "haik", "sidh", "peds", "pias", "guys", "leno", "fern", "vugg", "neap", "vena", "hays", "buds", "fiar", "melt", "scry", "toes", "okas", "firn", "bags", "awny", "poly", "your", "keta", "weld", "kiva", "urds", "palp", "hint", "dang", "anil", "ryot", "goth", "torn", "ansa", "crus", "rose", "toke", "rear", "haws", "peri", "bill", "kaon", "hobo", "gawp", "keep", "wart", "deil", "elks", "trug", "whig", "shin", "pepo", "awee", "syce", "dags", "mole", "ludo", "shaw", "supe", "baht", "euro", "jell", "abye", "fuds", "twit", "lino", "kohl", "awry", "kadi", "safe", "tams", "kune", "odah", "haes", "glim", "vein", "ouds", "sers", "oohs", "zeds", "idol"]
    bob   = ["purs", "doms", "glug", "sabe", "davy", "deni", "curr", "byte", "raki", "mure", "hold", "burg", "fisk", "bias", "lipa", "trap", "demo", "room", "ghee", "hogs", "wham", "myna", "acta", "snit", "vara", "larn", "ditz", "unco", "cast", "hags", "tavs", "ache", "dunt", "bona", "peak", "heel", "guvs", "dune", "puli", "gyre", "wynn", "ruck", "inby", "sake", "bent", "akee", "ance", "kaka", "mews", "fame", "jury", "tora", "week", "epee", "wych", "riot", "bize", "crew", "jiao", "karn", "fogs", "lieu", "beds", "meow", "caph", "reck", "mixt", "hyla", "sine", "tump", "keir", "tear", "birr", "fawn", "juco", "jowl", "jell", "nave", "oaky", "tzar", "nebs", "talk", "lent", "dies", "hilt", "dint", "guls", "sext", "jigs", "woof", "nene", "tike", "leys", "mark", "wire", "nite", "anas", "atma", "coma", "risk"]
    word = "supe"
    first = 1
    
  • Default User Avatar

    @YuKir hi, again: please get back to me with some data, thanks

  • Default User Avatar

    @heptapod hi, your solution code may be exactly the same, but if your results are not the same ~ then the difference is in the tests (and you are going to have to trust the Codewars tests). For example, try this; get all of the exact input from a random test from Codewars that fails your test. Drop that test into your environment and see what happens.

  • Default User Avatar

    same, but JS, idk what is this

  • Default User Avatar

    Never mind about this comment. I don't think memoization with recursion works you have to use a loop.

  • Custom User Avatar

    the current version works only with py2. to avoid what you did, just use // instead.

  • Custom User Avatar

    According to CW wiki Sympy is not available.

  • Custom User Avatar

    There are several random tests that the first time you submitted didn't pick up an error in your code but the second time the random tests may have missed it. If anything its a problem with my tests not testing all edge cases, which I will look into :-)

  • Default User Avatar

    @heptapod, my apologies. Pls post your code here and will take a look. Remember to flag as spoiler.

  • Custom User Avatar

    That's the basic difference between fixed tests and random tests. With fixed input values, the expected values are also fixed, with random input values you have to calculate the output somehow, and store it in a var normally.

  • Default User Avatar

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

  • Custom User Avatar

    It was marked as a Question, not as an Issue. About what exp is, it's the expected value (a string) calculated with a control function.

  • Custom User Avatar

    Your code is wrong.

    Not a kata issue.

  • Custom User Avatar

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

  • Default User Avatar

    think about the spoiler flag, when you're posting somewhat "critical" informations about/under a solution, please. ;)

    + is obtained putting the plus between two "back ticks": ``` (three of them, here)

    for code: two new lines, three back ticks, new line, your code, new line three back ticks:

    your code here
    
  • Loading more items...