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.
hhhhhhhhhhhhhhhh
Every "k" number. (Be aware, it is not index, by itself! At the end of line, somehow you must move it back to right place at left side - I know dumbly described, but I do not know if I can here give more than small hints. If not marked as spoiler - what you will not see, if not completed :D ...)
e.g. n7 k3 (first sample test) = you have 1,2,3,4,5,6,7. First you remove third position, what is number 3. Then again 3rd position from their, so skip number 4,5 and remove the 3rd in row what is 6. Then again third - you skip 6, move back to begin, skip 1 and remove number 2 ... and some magic and you have it algorithmized :D
It does actually matter, because every language has its own tests. It is hard to validate and fix a problem if one doesn't know where to start looking.
Hi JohanWiltink,
the language does not really matter here, but I was doing the C# one.
In my opinion there should be at least two more testcases that explicitly check that a certain solution is not correct.
Hope this is clearer now.
Best regards,
Robert
easy kata i think this one should be 5 kata
ok thanks
different
8 is given as 3,5 3*5=15 thats not the maximum product
Input : n = 8
Output : 18
8 = 2 + 3 + 3 and 2 * 3 * 3 = 18
is maximum possible product.
why would i use 3,5 instead of 2,3,3??
i got it now thanks
The kata is named
Maximum Product
, and the description neatly states you need tomaximize the product of these integers
. Isn't3*5
>2*6
?8 can be divided by 2,6 why would i consider 3,5?
a pointer which you should set as the length of your return array
what(size_t *outsz)is used for ??
you can just copy the name of this kata and searchh it in google plenty of explanation
Read the instructions again, the second argument is the steps value you should use.
Loading more items...