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.
Is it possible to get a solution faster than O(m*n) runtime with O(n) additional space or no?
Why.
thanks for bringing this up. actually a 0 dimensional matrix because it fails to contain any values. it is an empty shell; a random tests byproduct for frustration purposes. would help to see this specific empty matrix in standard tests.
:|
I didn't use any library (NumPy) and works well. However of course is more efficient using NumPy, but I think is more interesting try without.
Really nice little 7 kyu task
numpy or not numpy?
Description doesn't mention numpy. Sample tests use lists, not numpy arrays. Full tests use numpy. Reference sulution uses numpy, and doesn't pass sample tests!
Is this kata about numpy?
This comment is hidden because it contains spoiler information about the solution
naptın mk
Sure, Got it! It was my mistake in interpreting the kata.
The error message is wrong, but the test is correct.
build_one_two_three().next.next.next
isNone
, and it has nodata
attribute.Python: You have a mistake in the test case number 8 ---> test.assert_equals(build_one_two_three().next.next.next, None, "Third node should should have 3 as data.") as you are referencing to the memory address and not to the data itself, thus an issue.
I think it should be ----> test.assert_equals(build_one_two_three().next.next.next.data, None, "Third node should should have 3 as data."). The test makes the entire test attempt to fail.
Check your res2 variable you are indeed very close to the solution, just need to format it a little. :}
Example code block in Python has a typo:
sum_diagonals[
should besum_diagonals([
In your test cases:
Loading more items...