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.
python new test framework
Reference solution violates this constraint in even the simplest case:
Random tests are setting 1 test block per random test and creates many duplicate methods per random test case. Why not just use a for loop?
Some tests are supplying prices with incorrect scale and sort of expect solutions to fix them, such as:
There is a conceptual problem with the kata: the kata asks us to find the outline, which is defined as
And the reference solution assumes that the outline is a triangle, and calculates the two sides accordingly. However, the two sides of the triangle are not straight lines: they are triangle sides displaced vertically by card width. The actual outline is hence all the card width and card thickness combined, not a straight line from the apex to the two corners. This is very obvious once card thickness becomes comparable to card length.
This comment is hidden because it contains spoiler information about the solution
The current Elixir reference solution (brute force) is not viable. It times out before it can complete a single edge case such as
(4987653201,20)
, or(2987654301,10)
, etc.Finding the number of elements in an arithmetic progression based on its sum is not new.
Nice kata. A couple recommendations:
50
or greater(4987653201,20)
When I initially approached this problem, I misinterpreted
offset
to ben
-th iteration, rather than starting from the value>= offset
. The Description is fine; I just misread. I bring this up to gauge interest in a kata similar to this, but whereoffset
refers to then
-th iteration offset.It does not help to debug
Please use
assertEquals([message ,]expected, actual)
instead ofassertTrue...
Sample Tests expect wrong results
Tests expect
BigInteger[]
but initial code ispublic static List<BigInteger>