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.
Can you post the VIN number? Did it happen on the Random Tests or Fixed Tests?
Thanks for the translation!
The vin number
8WXSY7WGXBM122383
should returnFalse
, it is invalid. The check digit isX
but it should be7
.You can add a
print(number)
statement at the beggining of your function, so you can see which inputs are passing and which ones are failing.I understand your point, but this Kata is looking for the fastest possible solution, all other solutions are meant to Time Out.
I believe I finally managed to fix it. Tested your provided solution and it no longer passes.
I'm believe I'm missing the point, shouldn't the fastest implementation be prefered for the test suite, aren't we trying to measure the users code performance? And what is the advantage of going O(log n)?
Ok, I see what you mean now, I'm gonna change the random tests suite to match your code.
very bad idea: doing so you're changing drastically the perf requirements.
What do you think, the random tests parameters should be? Keep it at 10,000 now that thes tests were silenced or change it to another value?As you can see, I'm no expert programmer, but I believe the current test suite solution is already O(1).
Good point!
Thanks for the input
You are correct, the description should contain
line segment
instead ofline
.line
byline segment
in the Kata descriptionFun Kata!
Thanks for the input
And what do you mean exactly by "add one passing assertion at the end of the loop^, when all answers are good"?
Thanks for the input
I'm sorry for not stating clearly on the description.
Lines touching one of vertices of the rectangle, should return
True
, because that point is both on the line as well as the rectangle.Thanks for the heads up, fixed the description to make it clearer for other Warriors.
Unpublished this one, and kept only the Squared Spiral#1
Loading more items...