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.
.
I agree, "overlapping" was an ufortunate word, I changed the description.
The idea is to find the maximum number of visits which were simultaneously in progress.
A singular visit without any others counts as 1 -- as in reply above.
Maybe the description of
visits_count
should be changed tomaximum count of simultaneous visits
In this situation,
visits_count
should be 1, andwhen_happened
should be the earliest event.This kata is very poorly described.
At least provide some examples on particular cases like the one in the test.
Where is the overlapping event here?
id entry_time exit_time
1 2019-04-01 00:00:00 +0000 2019-04-03 00:00:00 +0000
2 2019-04-08 00:00:00 +0000 2019-04-09 00:00:00 +0000
What should I do when there are no overlapping events?
fixed - updated the description
Email script differ between description and tests:
"(...)Unfortunately, you have selected a bad(...)"
(description)vs.
"(...)Unfortunately you have selected a bad(...)"
(test).It probably should, but I believe that was not the point of your original remark.
Perhaps this issue would benefit from being re-written with appropriate cases. It's a waste of time to work with inconsistent input, as the saying goes - "garbage in, garbage out." In reality, people work with actual data rather than just descriptions of it. When something goes wrong, it's necessary to provide the dataset that caused the issue. I find it amusing that many computer science challenges focus on "corner" cases. In my experience working on production problems, developers don't typically think about "corner" cases; they focus on addressing the specific problem at hand. While there may always be another "corner" case that arises, the sheer number of potential cases is unlimited, so the idea of covering them all is unrealistic.
Maybe the default test should include result validation? :-)
I'm not aware of any errors. Correct solution passes tests just fine.
Which test did fail for you with that 'expected result'?
The default test - the only with the above dataset - doesn't include result validation.
Is something wrong with the simple test?
The above obviously do not overlap, but the expected result is
Very challenging kata, very good thing to learn how to count overlaps. Had to draw a lot of diagrams just visualise what my query is attempting to do.
Sets the name (alias) of result column.
What does "as mod" do?
You're right on all counts! Thanks!
Loading more items...