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.
Unfortunately, adding a couple more of fixed tests is not a complete solution, because fixed tests can be easily hardcoded. While a fixed test will point you to a flaw in your solution, it will not force you to fix it, but can be satisfied just by hardcoding it. The solution would be to add fixed tests and fix random tests so they are guaranteed to generate inputs of all kinds. And there is already many issues about this (I counted 7 issues related to insufficient tests).
You can propose a fork with more fixed tests, but this is only a partial solution. If you created a fork with good random generators for all types of expected results, it would be great.
Yes, it is. I passed the kata without knowing I have an error. Only looking at other solutions made me realise I misunderstood the assignment (at first I assumed that 1 and 2 over interesting number should be classified as almost interesting).
Palindrome error I made (my code worked for odd length input but didnt for even. e.g. 15751 was classified correctly but 1551 was not). This is exactly what edge case tests are for. For palindrome, one test case for even length and one for odd would catch that.
The random tests in Python don't cover much and their value isn't random afaik. There is an open issue about that saying there are no random tests, closing this one. Adding a couple more of fixed tests isn't the solution. I guess a much wider range should be checked the question is how.
Two issues with attempts:
Those are two bugs I had in my initial solution that were not checked in an attempt. Having more simple test for those edge cases would be helpful.
#python
finally solved it and each time i look at all the papers i used and how complex is my code i think i am a freaking genius , tht s all i ve to say
This is specified in the description:
Given an n x n array,
Attempt gives
[[]]
which is notn x n
(it is0 x 1
array)No tests with
n x m
array. Please fix descriptionI don't think so. the group by conditions are different - there is no reusable logic here
This comment is hidden because it contains spoiler information about the solution