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.
Related to the issue below: the minimal
people
size that forms non-trivial counterexamples is at least 9, so with a limit ofpeople <= 8
the kata becomes a much easier version of the actual problem.This is definitely not intended (as author solution can handle non-trivial counterexamples just fine), so
people
should definitely go higher. I'd even say go up to12
or so. Potential performance requirements would be a necessary sacrifice for this, since graph complexity in these kinds of graph problems go exponentially as the input size; for low input sizes you can't test anything meaningful.Original Python version is fine, but JohanWiltink's reference solution used for Haskell and JS translation contains a wrong algorithm that will fail against certain inputs.
The problem is, the input size has been (arbitrarily) constrained to
people <= 8
due to performance concerns, and I believe the minimal counterexample that can be created is at least9
:So the reference solution in these two language versions needs to be fixed.
(More preferably, they should use the same algorithm as the original reference solution, precisely to prevent issues like this.)
ok, centralizing here what's left to do about python specifically:
(don't forget the one below, and the suggestion about the inputs, for all languages)
cheers
not tested.
I'd still recommend to push the things a bit further. Like 15-18 people. Considering the logic of the problem, it's equivalent to an input of size people/2 (on average), considering the complexity.