Ad
  • Custom User Avatar

    The input array will always be valid and formatted as in the example above.

  • Custom User Avatar

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

  • Custom User Avatar
  • Custom User Avatar

    Sir, in your Kata, The "ORDER BY Species" statement check is sensitive to the indentation and thus throws error unless written in the same way. Please correct that and you'll have a great Kata.

  • Custom User Avatar

    Thanks for testing. Regards, suic

  • Custom User Avatar

    Yes, it worked, thanks a lot for being responsive to my issue. Great work
    The thing is all other solutions used a different approach which had a higher time complexity but lower space complexity.

  • Custom User Avatar

    Good spot. Thanks for reporting. I've replaced the em dashes. Please check now. Regards, suic

  • Custom User Avatar

    Sir, my solution fails because '—'(em dash) not '-'(hyphen) appears in the input and causes segmentation error as it is some higher level UTF character than C's char, please look into this as this is a trivial problem to correct.
    This may also be the reason because of which so low submissions in C are present.

  • Custom User Avatar

    I haven't time to examine your code but I am afraid that in some way you modify the input string.
    I think that the real test is

    dotest((const char*)"3 16 9 38 95 1131268 49455 347464 59544965313 496636983114762 85246814996697",
                         "3 16 9 38 95 1131268 49455 347464 59544965313 496636983114762 85246814996697");
    

    The input you give in your post is not the good one, expected is correct, your outpput is not.

  • Custom User Avatar

    Yes sir for C, and if you say that a lot of people have passed the C kata, I will try and look back at my solution more closely. But the main problem I was facing was the expected output containing numbers that weren't part of the list. Thanks a lot for looking into my issue.
    Input: 3 16 9 38 95 1131268 49455 347464 584576831 1324743690 304105689
    Expected: 3 16 9 38 95 1131268 49455 347464 59544965313 496636983114762 85246814996697
    My Output: 3 16 9 38 95 1131268 49455 347464 304105689 1324743690 584576831
    Also if I am pasting this same input and testing the output in sample tests, my solution works.

  • Custom User Avatar

    Which language (C?)? Give an example of what you say.
    107 people passed the C kata and I tried a few solutions without problems. All given numbers are positive.

  • Custom User Avatar

    Expected output contains numbers that aren't part of the list and also in some runs negative numbers are inputted.

  • Custom User Avatar

    Not an issue: 538 guys passed the C kata.

  • Custom User Avatar

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