Ad
  • Default User Avatar

    Your comparison function does not account for integer over/under flow ;-) that's the point of these fixed tests

  • Default User Avatar

    They're not, the description was awkwardly worded. If the input cannot be arranged into a square, it is invalid and you have to return "No"

  • Custom User Avatar

    You should provide an example...

    Here's one:

    Testing for [1, 0, 1]
    It should work for random inputs too: 'Yes' should equal 'No'
    

    Same for [1, 1]

  • Default User Avatar

    If it's a problem with your algo, please mark as a question, not an issue. EmperorMigx is correct, you have to allocate memory and mind your type.

  • Custom User Avatar

    The numbers of letters from 'sabbatical' that are present in string s.

    You're not doing that. Read the description again.

  • Default User Avatar

    Hi, there's no issue here. You're adding up all 5 letters in the input 'cCdvi' where cCdvi > 5 + 10 + 9 = 24, meanwhile 'd' and 'v' are not in the word 'sabbatical', so they should not be counted.

  • 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

  • Default User Avatar

    unsigned long which is 32 bit in C

    It's at least 32 bits.

    Input values are up to 64 bits.

    Which implies that unsigned long has this size on this platform.
    I've just checked, everything works. Check your solution.