Ad
  • Custom User Avatar

    Email script differ between description and tests:

    "(...)Unfortunately, you have selected a bad(...)" (description)

    vs.

    "(...)Unfortunately you have selected a bad(...)" (test).

  • Custom User Avatar

    It probably should, but I believe that was not the point of your original remark.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Sets the name (alias) of result column.

  • Custom User Avatar

    Your interpretation of exit_time description and start=exit is correct.

    Wording of exit_time definition was specifically chosen to express interval
    openess and covers points 2 and 3 and, by extension, point 1.
    I don't believe further extension of specification is needed.

    Your solution seems to incorrectly handle case described in p. 2.

  • Custom User Avatar

    Overlaps are the whole point of this kata. Check your query against a dataset with multiple events starting at the same time.

  • Custom User Avatar

    Thanks for the info!

  • Custom User Avatar

    The solution by alimanavi, gcapo, and others is indeed wrong.
    It returns the right answer only when database (by chance) returns rows in expected
    orded for second column omitted from order by clause.

    Unfortunatelly there's not much that can be done beside unlisting the whole kata.
    Test cases are locked from editing so I can't try to find a more consistently failing
    case to add.

  • Custom User Avatar

    Closing as non-issue

  • Custom User Avatar

    Which test cases fail for you?

  • Custom User Avatar

    Imagine having just two visits:
    ENTRY 2019-04-01 00:00:00 || EXIT 2019-04-10 00:00:00
    ENTRY 2019-04-03 00:00:00 || EXIT 2019-04-13 00:00:00

    For these two, we have the following events:

    before 2019-04-01 there were no visitors,
    at 2019-04-01 00:00:00 first one arrived, we now have one visit in progress,
    at 2019-04-03 00:00:00 second one arrived, we now have two visits in progress,
    at 2019-04-10 00:00:00 the first one is gone, so we are down to only one visitor,
    finally, at 2019-04-13 00:00:00 no one is left.
    The maximum number of simultaneous visitors is: ?

    There were that many visitors visiting between: ? and: ?

    The earliest time when there were ? concurrent visitors is at the start of that timespan.

  • Custom User Avatar

    Nope, the specs says "earliest timestamp when there were visits_count concurrent visits" so it's the other way around.

  • Custom User Avatar

    Hi! Try checking your solution againsta a dataset with multiple visits starting, ending or one starting and another ending at the exact same timestamp.

  • Custom User Avatar

    Hi! Try running your query against a dataset with multiple events starting on the same timestamp.

  • Custom User Avatar

    For these two, we have the following events:

    • before 2019-04-01 there were no visitors,
    • at 2019-04-01 00:00:00 first one arrived, we now have one visit in progress,
    • at 2019-04-03 00:00:00 second one arrived, we now have two visits in progress,
    • at 2019-04-10 00:00:00 the first one is gone, so we are down to only one visitor,
    • finally, at 2019-04-13 00:00:00 no one is left.

    The maximum number of simultaneous visitors is: ?

    There were that many visitors visiting between: ? and: ?

    The earliest time when there were ? concurrent visitors is at the start of that timespan.

  • Loading more items...