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.
Right, the end-handling of blocking the intersection is different by necessity (just imagine beyond the end is a cliff that cars fall off so the exit from the intersection is never blocked!). Anyway, the rules for those scenarios are covered by the spec:
I may agree that a gap emerge when two cars pass green.
But it's strange, the same thing don't happen at the end , the first car just annihilates.
Also strange that the car cannot enter green a crossroad cars just after the crossroad are blocked - really they do so, creating mess :)
Which rules seem counter-intuitive?
Very elegant kata both in single- and multicar versions.
However, rules to pass green , especially at the end, seems counterintuitive for me
and demand additional handling, only to pass the tests
I feel your pain. But it kinda does -- the Description says that it uses x for rows and y for columns. It's messed up, but it is specified.
The description does not specify indexing order - x, y vs y,x.
Worse, the preloaded tests don't too.
So, if you initially chose the wrong order, you cannot understand what is problem with random tests.
Could you add such test, please, f.e. (is_efficient(11, 10, 5.5), True) ?
Could you clealry explain that only developer_id=1 must be checked,
or to drop records with develper_id = 2 from second random test?
I hadn't found this in the description,
so could not understand why my final test adds two extra records,
then I made ugly cheat hack to open solutions,
only to see - they all check developer_id=1 explicitly...
I would gladly disable gmp library for python but from previous experience this provokes a lot of nagging.
I may agree it is 7 kyu for Python,
but for JS, you need to write a prime check and search how to handle BigInt,
this still demands some work...
This passes all tests, but goes into endless recursion when arguments are not integer.
I think we should extend tests like it is done in Ruby version
This comment is hidden because it contains spoiler information about the solution
The description is vague, I expected an integer arithmetics which is intuitive for "wallpaper planning",
but the correct solution demands most trivial interpretation.
Also don't understand why solution for one zero dimension is zero - in my opinion an abstract room 2x0x1 still needs 4m of wallpapers
The tests are fine, your function's name is
formatDuration
instead offormat_duration
. Rename it so the tests find it.Looks like there is a problem in python tests
it starts with:
import codewars_test as test
from solution import format_duration
but when I run I get:
Traceback (most recent call last):
File "/workspace/default/tests.py", line 2, in
from solution import format_duration
ImportError: cannot import name 'format_duration' from 'solution' (/workspace/default/solution.py)