• ###### David Gildourresolved an issue on "Mirror, mirror, on the wall..." kata

Hey, an interesting scenario, but this should be treated the same way as any other. Let's say we have an array `[-5, 10, 8, 10, 2, -3, 10]`; as you can see there are 3 occurences of `10`, but still the algorithm works the same way: the greatest is `10`, so it goes in the middle, the next greatest is `10`, so it goes on both sides, then `10` again on both sides, and after that the other numbers accordingly, resulting in `[-5, -3, 2, 8, 10, 10, 10, 10, 10, 8, 2, -3, -5]`. I added this to the tests for clarity nevertheless.

• ###### David Gildourcommented on "Array to HTML table" kata

You're right, I ommited this in the sample tests. Already fixed that, but since sample tests are editable it's not that big of an issue.

• ###### David Gildourcommented on "Duplicate sandwich" python solution

No, the kata test cases all provide a list with exactly one duplicated element, so both `start` and `end` will have actual numerical values; to be specific - index of the first occurence of the duplicated element and the index of the second occurence of the same element. These are then used to return the expected slice of the input list.

• ###### David Gildourcommented on "Duplicate sandwich" python solution

in case of that kata, the right side of the first assignment will always return a list with two values (the input list will only have one duplicated element, so the condition `arr.count(x) > 1` will be met only for two identical elements), thus the assignment `start, end = [...]` will assign a first value to `start` and second to `end`. The values are indices of this elements, beacuse as you can see I am using the `enumerate` function (for more info check the Python docs on `enumerate`) on the input array.

• ###### David Gildourcommented on "Sum without highest and lowest number" kata

Check the sample test cases to see what is wrong. Specifically, the first test case.

• ###### David Gildourresolved a question on "Mirror, mirror, on the wall..." kata

Definitely, `692` was duplicated in the input list, and also the median, so it should a middle element in the output, as well as reflected on both sides of the middle element, just like Chrono79 stated.

• ###### David Gildourcommented on "Mirror, mirror, on the wall..." kata

Great, now I can work with this :D Your code is fine except for one important detail you oversaw. Think about how you remove the processed `arr` elements and visualize your algorithm on this example: `[-3, 15, 8, -1, 7, -1]` ^^ I think you will get this in no time. edit: let me know if you figured this out, I really want you to get something out of this kata!

• ###### David Gildourcommented on "Mirror, mirror, on the wall..." kata

The description was updated after adressing this suggestion to "Your function should not mutate the input array, and this will be tested". Your solution clearly mutates the input.

• ###### David Gildourcommented on "Mirror, mirror, on the wall..." kata

Again, the error message you provided is far to vague, I don't know what's wrong. Post your code (with spoiler flag), so we can look into this.

• ###### David Gildourresolved a suggestion on "Mirror, mirror, on the wall..." kata

Approved, thanks.

• ###### David Gildourcommented on ""Mirror, mirror, on the wall..." C Translation"

Meh, you probably need to fork this again, because I cannot approve this automatically, there's an annoying bug on CW.

• ###### David Gildourcommented on ""Mirror, mirror, on the wall..." C Translation"

Looks good, approved. I will probably make the C part of the description a little more visible, but as for now it's cool.

• ###### David Gildourcommented on ""Mirror, mirror, on the wall..." C Translation"

Oh, and due to the specific nature of C code, maybe include some words in th description regarding the different function signature, so that people would be less confused (again, this is an entry level kata).

• ###### David Gildourcommented on ""Mirror, mirror, on the wall..." C Translation"

Looks good, but I have two issues - random tests are too random: 100 arrays with random sizes 1-1000 is not only inconsistent with the description (`...[the list] will vary in size between 0 and 10000`), but also smaller than the test cases in other languages. There should be at least one test with 10k size array. I know this is an easy kata, but that should be no excuse for writing exhaustive tests. Another thing is that the values in the arrays are only positive integers, which is again inconsistent with the description (`The list will always consist of integers in range -1000..1000`). Please, address these so I can approve your translation.

• ###### David Gildourcommented on "Mirror, mirror, on the wall..." kata

Julia translation added thanks to stellartux.