Yes i am cianging the values in input array. its long [] array. Its simple swap, thats allowed in java as far as I understand. Or Is this the requirement of the kata not specifically java.
new long[] {1,2,9,-4,-2,-6 }) so for this my code would do in place swap on the array and produce new long[] {-6,-2,-4,9,2,1 }, why would this be wrong.
Getting the following error
testDoNotChangeInput
Input array must not be mutated: arrays first differed at element [2]; expected:<471358> but was:<-10968>
Stack Trace
Could someone give me the input for the above test. Not sure what I am missing, thanks
have question on this
Testing [107, 158, 204, 100, 118, 123, 126, 110, 116, 100]
There should be only one unique prime factor for 1262 found []
Actual (2 932)(3 453)(5 210)(7 126)(11 110)(17 204)(29 116)(41 123)(59 118)(79 158)(107 107)
Expect (2 1032)(3 453)(5 310)(7 126)(11 110)(17 204)(29 116)(41 123)(59 118)(79 158)(107 107)
I am not understanding the above of how (2 932) is not correct.
2 is a factor of 100, 116, 118, 204, 158, 126, 110
that should make it (2 932) how is it (2 1032) what am i missing here ?
This kata is not explained well, I have two queries if some one can help
It can happen that a sum is 0 if some numbers are negative!
Example: I = [15, 30, -45] 5 divides 15, 30 and (-45) so 5 appears in the result, the sum of the numbers for which 5 is a factor is 0 so we have [5, 0] in the result amongst others.
I dont get how the kata get 5,0 even 3 divides 15, 30 and 45
yes i figured and did it...:)
Yes i am cianging the values in input array. its long [] array. Its simple swap, thats allowed in java as far as I understand. Or Is this the requirement of the kata not specifically java.
new long[] {1,2,9,-4,-2,-6 }) so for this my code would do in place swap on the array and produce new long[] {-6,-2,-4,9,2,1 }, why would this be wrong.
Hi guys have a small issue...
Getting following error
testDoNotChangeInput
Input array must not be mutated: arrays first differed at element [2]; expected:<471358> but was:<-10968>
Stack Trace
Can someone give me the input for testDoNotChangeInput, Not sure what is happening ? I am uinsg long
Hi all need help with this...
Getting the following error
testDoNotChangeInput
Input array must not be mutated: arrays first differed at element [2]; expected:<471358> but was:<-10968>
Stack Trace
Could someone give me the input for the above test. Not sure what I am missing, thanks
thanks...yup two times...so thats a bug in my code...will fix it
have question on this
Testing [107, 158, 204, 100, 118, 123, 126, 110, 116, 100]
There should be only one unique prime factor for 1262 found []
Actual (2 932)(3 453)(5 210)(7 126)(11 110)(17 204)(29 116)(41 123)(59 118)(79 158)(107 107)
Expect (2 1032)(3 453)(5 310)(7 126)(11 110)(17 204)(29 116)(41 123)(59 118)(79 158)(107 107)
I am not understanding the above of how (2 932) is not correct.
2 is a factor of 100, 116, 118, 204, 158, 126, 110
that should make it (2 932) how is it (2 1032) what am i missing here ?
ok that makes sense...that is what i was thinking...the way kata is described it never lets that on...i thought it was saying it can only be 5,0
This kata is not explained well, I have two queries if some one can help
It can happen that a sum is 0 if some numbers are negative!
Example: I = [15, 30, -45] 5 divides 15, 30 and (-45) so 5 appears in the result, the sum of the numbers for which 5 is a factor is 0 so we have [5, 0] in the result amongst others.
I dont get how the kata get 5,0 even 3 divides 15, 30 and 45