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.
'push(head, data)' in the first position (0).
data -> head -> .....
Understood. I should have read the question better. Thanks for the help, it worked.
You have to return elements of a1 which are substrings of elements in a2 and not the other way around.
Thus,
'46'
and'ode'
are not supposed to be returned.My code works with the test codes, but fails at submission on this inputs:
My code returns: ['1028', '1295', '46', 'ar', 'ode']
But it says it should return: ['1028', '1295', 'ar']
I don't get it.. it should catch substrings as well right?? Why should it return just should equal ['1028', '1295', 'ar']?
Never mind! I guess sum(range(int)) is not as efficient.
For anyone facing this issue, you should figure out another way to do it.
Hint:A guy called Gauss solved this a while ago :)
use integer instead. Something like:
m = int(m)
n = int(n)
use integer instead. Something like:
m = int(m)
n = int(n)
This comment is hidden because it contains spoiler information about the solution
I think this solution doesn't insert a node in the first position (0).
I think this solution doesn't insert a node in the first position (0).
I think this solution doesn't insert a node in the first position (0).
I think this solution doesn't insert a node in the first position (0).
Thank you guys. I was returning the data value instead of the node object.
try throw new Error() instead of raise Exception()
Raising Exception should work. There is probably some other fault in your code.
Try printing the input to your function to see what value your function is tripping at.
Loading more items...