Ad
  • Custom User Avatar

    Test Failed
    It should work with random inputs too
    Expected and actual are both Values differ at index [62]
    Expected: 15844851111166432.0d
    But was: 15844851111166428.0d

    //I Just refresh the browser and submit again and it works, what am I missing here? sometimes the code is working, sometimes not? weird. Thanks for future response

  • Custom User Avatar

    This didn't work out for me, I don't know why so I have unlocked the solution.

  • Custom User Avatar

    What language you're using? if C then you should mind the return type.
    In this case the return type is size_t
    Use calloc bro this was my error too. I'm using C.

    BTW if you see this, would you not mind if you already finished g964 Kata's the:
    Rectangle into Squares and Backwards Read Primes

    I believe I know how to solve it but I don't know how to return the value. I've rewritten it without using typedef struct and I manage to have correct answers. But in the format typedef struct in those katas I'm getting error: Caught unexpected signal: 6

  • Custom User Avatar

    Good day! I can't solve it the reason is I don't know how typedef struct Data works I don't know how to return the value without error, could you please help me. It passes first test but then next cases are not. I'm using C lang It always say

    Caught unexpected signal: 6

    By the way I've rewritten the code by not using typedef struct so that I'll know if my codes are in fault but it passes all the sample tests. Thanks in advance!

  • Custom User Avatar

    !!!Watch out buddies for this!!! Pretty bit confusing. The example shows that the result are double array but in the problem itself it's just a simple array.

  • Custom User Avatar

    Too clever to find out that, mutating the input. haha nice!

  • Custom User Avatar

    I am confused as well at first.
    Assuming you already know the instruction for i,d,s now let's proceed to the returning of the result.
    There is no fix array length for result because array index is incrementing every 'o' So for instance:

    string input = "iioio"
    int result[] = {2, 3};

    string input = "iodoio"
    int result[] = {1, 0, 1};

    I hope you understand bro!

  • Custom User Avatar

    Could you please help me. I'm using C and I don't know how to return the answer. Thank you in advance!

  • Custom User Avatar

    so there is a cheat code for this haha. They say algorithm must come first, I forbid you need also to know the structure and deep codes of the language.
    50% code and 50% algorithm.
    This is lit!

  • Custom User Avatar

    there are other ways than permutation. I thought of that as well but the kata sensei provided a hint that says the number could be very large and by that permutation is impossible because of the time constraints.

  • Custom User Avatar

    What a naughty a boy! his mom too tho watching the ball as it bounces back many times.

  • Custom User Avatar

    @rowcased I've learned a valuable lesson. My codes are working super fine until I saw what caused me the time out. It is the reoccurence of strlen I have learned that the strlen condition reiterates again the whole length of the array. Waaaaaaaah. So next time I'll definitely store it in a variable.

  • Custom User Avatar

    okay thanks for your response @rowcased maybe I need more training and good algorithms. :D

  • Custom User Avatar

    yeah true 400 coders but I think it's a little bit unfair I tried to solve it in another language and it passed. Maybe test cases in C is harder? or has more random tests. I still couldn't figure it out I've revised my code 3 times in C. I'm just wondering. Thanks for noticing me.

  • Custom User Avatar

    What's wrong with C random tests? why I'm getting TIME OUT :(

  • Loading more items...