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.
While the emphasis is on the uniqueness of the features rather than their order, the final tests require that the features maintain their original order. It might be helpful to clarify: "Although order is not a factor when determining uniqueness, the final output should present the arrays in their original order."
This comment is hidden because it contains spoiler information about the solution
Is the second criterion actually enforced ? Or even enforceable ? My own solution does not explicitely take care of it, I'm not sure whether it's because PostgresSQL produces a stable sort as an implementation detail (since the SQL standard does not make such a guarantee) or whether it's a consequence of using
regexp_split_to_table()
This comment is hidden because it contains spoiler information about the solution
I am currently working on this kata on sunday, and I’m encountering some issues with the tests. The "results: expected" field appears blank in the sample test suite, as well as in the random tests within the full test suite. For the edge case test, there are two valid entries for sale_date with dates "2024-10-19" and "2024-10-20." However, in the sample tests, sale_date values fall between "2024-10-21" and "2024-10-30," and in the random tests, they range from "2024-10-21" to "2024-11-04."
(Edit: I tried it again with the exact same solution on the following day and it passed with flying colours, so there is something wrong with the tests on sunday)
My solution relies on the ISO 8601 week number and would return wrong results if:
1
to find the previous one, which would give0
, an invalid week number. (perhaps that one is impossible to catch)it should be mentionned that the sequence always starts from
1
In the random tests, there are duplicate features in the
special_features
column; features array such as{"Deleted Scenes","Deleted Scenes",Trailers}
are apparently expected to be rejected.the description only says:
which does not make it obvious how duplicate entries should be handled - i would expect duplicate entries to be idempotent. Perhaps this should be clarified ?
Notes says:
It is not possible for more units of a certain product to be sold than purchased at any given moment in time because the FIFO Gross Margin calculation assumes that sales are matched to prior purchases.
but in example tests I see
it looks like a contradiction to me. So from the description the result for this sku is unclear (could be 20, 30 or even 40)
purchase / sales - naming is inconsistent: singular/plural
I'd suggest 'purchases'
Something is wrong with the test cases, I even recreated some of the accepted queries and it throws up a failed attempt after passing the initial Test.
I've got a solution that handles every part of the problem except the (if a customer ever rented an NC-17 movie). I can filter out all NC-17 movies from the total count, but am failing to think of a way to completely remove these customers without using a CTE or subquery. A hint would be appreciated.
The example in the description is not entirely successful, it would be better to add one non-day off and one day off that does not relate to the 23rd year
The first bulleted condition doesn't make sense to me. Some examples are needed to clarify. Not really sure how to go about solving this until that's fixed.
It also doesn't make sense that some of the rental_dates occur after 8/1/2005, when supposedly for the context of the problem today is 8/1/2005. How can a customer have rented a video in the future?
I found that depending on your solution, submitting multiple times can change whether or not you pass the test.
Loading more items...