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.
Oh, I was just playing with tests, you can choose different ranges. I just wanted to have consistent results, that's why I limited the value to 10 or 11.
Using sets helps for merging in this case, yes, but also checking if an element is included in a set is O(1), while checking if an element is included in a list is O(n).
You can read here more about time complexities in python (that's how I learned as well at the beginning): https://wiki.python.org/moin/TimeComplexity
@SnickersTheCat, you are right, but the description specifies
but you have a friend in judging who has excluded all hopeless initial l values for you
, so a losing value will not be tested.Very smart!
why?
I think it's solved now.
This comment is hidden because it contains spoiler information about the solution
Specifying in the description if values will always be greater than 0 or not should be enough.
You should do a manual addition of the two strings (same as you would with pen and paper), without converting them to integer.
Nice!
This usually means that you have entered an infinite loop (like a while loop) or that your solution is too slow. Are you trying to convert strings to integers? That solution would be too slow.
Also, description should be in general language agnostic, while your last row from the description is definitely python related. :P
From the description:
Has a 5-sized shape of cells of value 1 with coordinates (0,0), (1,0), (2,0), (0,1), (2,1)
. I assume that you meant(0, 0), (0, 1), (0, 2), (1, 0), (1, 2)
? It wasn't clear at first if (x, y) is (row, column) or (column, row). Maybe you could explain this. Also, you don't specify if the grid will ben x n
orn x m
. I would assume fromgiven a grid of an indeterminate size
that the grid size will ben x m
?Name of the function should be
largest_shape
.This comment is hidden because it contains spoiler information about the solution
Nothing wrong, I was just playing around. :D
Loading more items...