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.
This comment is hidden because it contains spoiler information about the solution
what is the use of underscore?
In response to @lodimob. Thanks for this kata, Could you add to the description that fillll point that fall on lines are expected to do nothing? I add been confused on the last mixedDrawing tests if my mistake came from this and had to check here.
Also I agree as it as been said already, a bit more small tests cases with mixed drawing would help a lot for debugging. I just can't find what is wrong with my code since every simple test passes.
edit: I think my mistake come from the fact that I expected rectangle to be drawn from top left to down right, and the last test was the only one doing it in reverse manner.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
same issue above with more details, closing
Please, someone explain what means this "x" at the beginning
Method chars() return IntStream which method sum() return an int value, hence casting to int is redundant.
JavaScript
@rscharfer Don't modify the passed argument
inp
this O(logN)
its kata can be solved O(N)
Draw the line with 'x' which connects the given points.
If the points are diagonal, a rectangle instead of diagonal line should be drawn
Regarding the points being diagonal, how can we verify this for a rectangle?
For a square, i.e. if the points are diagonal, we can verify with this formula:
|𝑥1−𝑥2|=|𝑦1−𝑦2|
this wouldn't apply for a rectangle
This comment is hidden because it contains spoiler information about the solution
Confirm that the description is OK now.
Added.
In the example has
solve("v") = True
but not tested inJava
Test Cases.Loading more items...