I see at least 6 assertions in that single test in C#, adding random tests would be nice tho.
There need to be more tests for C#. One test can easily be cheated.
It might be useful to specifically stress the importance of the fact that only one number will appear odd number of times within an array. Current description can be also understood as one of the numbers is different, as odd sometimes is referred to as "different". While the task is not difficult, it might help new guys to understand it better
instruction is not clear!
You are right, thanks for your time
That doesn't create a copy, that's another reference to the same array. You can easily check that printing seq before your manipulations and just before the return line.
Is that ok? I can't find info on copy method, and the assignment seems wrong.
Reading this could help you.
Sure, in the first line I put:
seq.copy = seq. After that I only use seq.copy on the rest of the code. There is something wrong in this?
seq.copy = seq
A copy is passed to the control function after the original array is passed to the user's function. It should be the other way around, the copy should be passed to the user's function.
Can we see how you made your copy?
I made a copy of the input and only used the copy in the logic. Still the same result
Don't modify the input.
In ruby, the random test expects 'nil' as results when the input has clearly one number which is odd times repeated.
Testing for [1, 14, 8, 8, 10, 1, 1, 6, 1, 14, 10, 4, 8, 1, 4, 16, 1, 16, 8]
It should work for random inputs too - Expected: nil, instead got: 6
Why it return -1 instead of 5
because i run my code in IDLE python 3.7.2 it give me 5
Not an issue.