Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Hi,
Prime numbers have nothing to do with it. The minimum should be just the sum of all numbers in the sequence ;)
So i have been looking at the sequences for so long. I have come to the conclusion that the number you swap should create the smallest prime number possible when you add up all the numbers in the sequence (this is what i thought the pattern was). However when i run my code i get the error... [1,1,1] should equal [1,1,2]... i thought it would be [1,1,3] (as the total 5 would be prime) So i am completely stumped and in dire need for some assitance. I cant crack the sequence :(
try to understand the patter for the sample case,its very easy just spend some it analyzing it
are you returning a pointer to a dynamically allocated integer array?
Had a question on the C test functions. It looks like my program is working. I printed out pre-sorted array, sorted array, and altered array. It looks all correct. However, when the test function calls free() I get an error "invalid size" and about every other attempt I get a "free(): Invalid Pointer". These errors come at the end of everything in the code. Is it something in the return statement? I'm returning a int* like the function protoypes.
Curious what the test functions are having an issue with since the only amplifying remarks were hexidecimal values.
reasonning/pen and paper.
;)
How do you know which number to replace and what the replacement number should be?
To be honest you only need to understand basic vector addition and multiplication, so I suggest to start with that. For some visualization, I can link you something which I created alongside with this kata - click. It's randomized, so whenever you refresh the page, the result will be different. Maybe this will help you see it a little better. I initially intended to link it in the description, but it seemed like an overkill. If you don't want to spoil yourself the solution, then don't look into it's source code (;
Hi.
I'm not a very mathsy person. Therefore i am confused as to how you calculated x=-108.21, y=-66.64 in your seccond example. I understood the first example of how you got 14 but i am completely lost when you apply it to the 2-dimensional plane. I guess i don't know how to work well with the vectors and radiuses. Perhaps you could point me to some material that i need to learn to understand how to do this calculation or if you could offer any help it would be much appreciated.
Thanks.