• ###### 0x00clcommented on "Grasshopper - Combine strings" python solution

This is pedantic but the description does say:

Create a function ... that accepts two parameters

Although the test cases doesn't test for the amount of parameters, this solution would technically be incorrect as it accepts 0 to N parameters.

• ###### fisterloegsovscommented on "Sum a list but ignore any duplicates" kata

I understood it like i had to sum it but ignore any duplicates of a value that we had already seen, not ignore both of them.

• ###### ejini战神resolved a question on "Sum a list but ignore any duplicates" kata

OP solved it, closing

• ###### rowcasedcommented on "Sum a list but ignore any duplicates" kata

@RealDeepazz this is because you are modifying the original array. The kata currently has a function declaration with this array designated as `const`, so it should not be altered whatsoever. Perhaps copy your code (to save it), refresh the kata trainer, then work on an algorithm that does not mutate the input. If this declaration was in fact given to you with the `const` designation and if you then changed that so you could replace any of its contents... well, don't do that!

c

• ###### KayleighWasTakencommented on "Sum a list but ignore any duplicates" kata

What language?

• ###### RealDeepazzcommented on "Sum a list but ignore any duplicates" kata

Hey boss! I pass the basic tests, but I fail to pass the complete test while I believe the results are correct.
for instance:
< Incorrect Result >

array = {0, 0, 10, 9, 7, 0, 0, 6, 5, 0, 0, 0, 0, 1, 0}

Submitted: 38
Expected: 21

< Incorrect Result >

array = {0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

Submitted: 17
Expected: 0

Random_Tests
< Incorrect Result >

array = {0, 0, 0, 0, 7, 0, 0, 0, 0, 3, 2, 0, 0, 1, 0, 0}

Submitted: 13
Expected: 2

please respond if needed we can chat in discord!!

Approved

Approved

• ###### Lucianofitticommented on "Sum a list but ignore any duplicates" kata

When i first looked at the problem i said too easy.. i can solve this in 1 minute.. it took me 30 minutes, dont underestimate any problem guys, anyways, pretty fun!

Approved.

• ###### renaecarter93created a question for "Sum a list but ignore any duplicates" kata

I had a quick question this: const int array[length]. If the array was 5 elements long then this would give you const int array[5], which would be out of range right? Please let me know if I am incorrect. ALso, are we supposed to alter the parameters at all or is it expected to use what is there?

Thanks.

edit: I am working on the C version.