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
The generator solution is relevant at least for JavaScript and Python. Perhaps even the "java.util.Iterator" interface would be suitable, from
Java that allows you to create iterators for lazy data processing.
For which languages? Generatora are not native in many of them.
I would prefer to implement the function as a generator, which would allow you to avoid storing all y values in memory and reduce memory consumption when working with large ranges.
The RK4 function does not exit, but saves its state, allowing you to continue obtaining y values in the loop.
Who votes 2 kyu here, this can't be in good faith :/
It would be worthwhile to include handling of edge cases at the beginning of the solution. You need to make sure that the function handles edge cases correctly, such as when a or b is 1.
An example of handling edge cases:
def number_of_sets(a, b):
This kata does not describe how to handle cases where the target column does not exist in the DataFrame. Adding a check for the presence of a column and an associated error message would improve the feature.
Overall, the challenge provides a good starting point for practicing working with the pandas library and filtering data in a DataFrame, but some additional detail and testing could make it more complete.
are you sure you're returning an array of appropriate size? (I bet not).
not an issue: this just means your solution doesn't handle all cases.
edit: on the other hand, if you can extract the exact kind of input that makes fail your code, maybe it can be interesting to add it as fixed test.
After completing a kata and attempting to confirm the completion, I received the following error:
java.lang.AssertionError
This error occurred when I was trying to confirm the completion of the kata. It appears to be related to a test case in the "QueensAndKingsTest" class, specifically in the "testBestMatchBigRandom" method.