Ad
  • Default User Avatar

    True the description is misleading right of the bat !

  • Custom User Avatar
  • Default User Avatar

    Thank you dear friend i finally got through it !

  • Custom User Avatar

    this allocation works, but your code tries to write beyond it

  • Default User Avatar

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

  • Custom User Avatar

    this would be plenty to know what's going on: *** Error in './test': munmap_chunk(): invalid pointer: 0x00007fff4ec8c690 ***

    you need to return an integer array. in C this means the function author (you) needs to dynamically allocate memory for the array. the caller of the function (me) will free the memory.

  • Default User Avatar

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

  • Custom User Avatar
  • Default User Avatar
  • Default User Avatar

    Fixed. See @Bouchert below's comment. Your answer will still be wrong after the fix.

  • Default User Avatar
  • Default User Avatar

    Thanks Luminux. I have updated the test cases and reference solution to what @Bouchert below has suggested. I'm not the author of the C# kata, I only created the javascript version, so I wasn't aware of the float rounding issues.

  • Custom User Avatar

    First of all i'm sorry for my excessive behavior towards you! I guess i must have been having a rough day... (not that it's any excuse)

    Regarding the issue at hand, I was attempting it in C#!

  • Custom User Avatar

    the numbers are so large you don't have time to simply iterate through them completely => you need a different approach

  • Default User Avatar

    Hi Luminux. Can you tell me what language you were using to complete the kata? This kata is quite old and I'm not very active on this site anymore, at least when it comes to authoring katas. Before a kata can go live, it is in beta status. When enough users have completed it and ranked it, it can be approved by a power user. There's quite a bit of back and forthing before it is a ranked kata. Hopefully by then, the bulk of issues would have been sorted out, so things like basic tests would have tested thoroughly, not just by me, but the hundreds of other users that have completed it, so I find it unexpected when a user raises an issue for basic tests. This leads me to believe that my description is most likely not conveying what I need to be done or what I have seen countless times, users skim over the description and basic tests and then implement the wrong thing, thus leading to their frustration and then lashing out. It would be great if you could tell me what test is wrong and why you think it is wrong so I can understand where you're coming from. You need to understand that everyone that authors a kata does this for the community and no one here gets paid so it is very disappointing to me when I see behaviour such as yours. Please answer the questions I have asked you so I can have a look otherwise I'm closing this issue.

  • Loading more items...