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.
The kata accepts all correct algorithms, simply by the means this site works. And correct algorithms are those which fulfill all kata's conditions, and the optimality with n<=8 is one of the conditions. If you chosen to split algorithm into two halfs, it's up to you, but there will be people who chose to find a more optimal algorithm and these are why this kata was created. I'm not going to change kata simply because there are alogorithms like yours. There always be algorithms split into 2-3 or even 10 parts.
It's yours (the solver) choise how to aproach the kata. You treated n <= 8 as a separate case and hardcoded it, others - did not.
I'm sorry, but for me the whole point of the kata is to find the algorithm, it's a lot of fun. The rest is very boring and easy indeed, fortunately it takes 95% to find the algorithm and 5% to code it. There by this kata is created.
If some people prefer to do it with wiki - I can't help it, but I'm not going to help them either, especially when it comes at the cost of the people I care about - those who enjoy finding the algorithm on their own.
I did not :)
ty. this solves the issue.
Hi. Do you happen to know, why I can see "Input correctness tests" section in the example tests when I press edit kata button, but when I press Try again button to solve the kata - i don't see the "Input correctness tests" section, I see the old version of the example tests.
ok, i've added input correctness tests to the example tests.
Are you talking about the solution you've submitted?
I can't reproduce the problem.
The preloaded functions are pretty straightforward. The first one - "sort(instr, shoes)" - it is shown in the description. It would be both misleading and wastefull to add an index check there - tests will run longer.
The second one is "max_n_instr(n)". It will not fail unless you modify tests to make them try to sort a list with n <= 1 shoes. I will fix it to never fail, good idea.
idk, looks much less obscure to me than any 10+ lines solutions. Of course comments would be welcome, but even w/o comments this one takes much less time to read and fully understand.
This comment is hidden because it contains spoiler information about the solution
What is 3628800?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
answering
This comment is hidden because it contains spoiler information about the solution
I mean in the bounder description it is stated:
I c1 is an integer, so read this as
meanwhile carbon number of a molecule (in chemistry) means a total amount of carbons in the molecule.
carbon number of an atom is either 1 when atom is carbon or 0 when atom is not carbon.
as far as I can guess from the tests, c1 is the position of the atom on the branch, but it took me a long time to understand. Partially because I didn't see branches as consequtive sequences of atoms and the fact that branches don't have to consist from carbons only, but any kind of atoms can be there and then called "carbon number" c1 would have nothing to do with the actual carbon element.
Loading more items...