Ad
  • Custom User Avatar

    IMHO that's 6 kyu not 7.

  • Custom User Avatar

    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."

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I thought that use of window functions might be the best choice, but couldn't figure it out why am i getting 2 results instead of 1.

    Now, when i can see solutions, i still can't fully understand them...

    Nice kata though :)

  • Custom User Avatar

    how 2 blue honda can counted twice in test 2?

    puts "Another Static test ('blue honda' is counted twice):"

    DB[:traffic_observations].delete
    
    DB[:traffic_observations].multi_insert([
      {datetime: Time.parse('2024-06-25 09:50:00'), type: 'white toyota', traffic_light_id: 1},
      {datetime: Time.parse('2024-06-25 09:55:30'), type: 'black bmw', traffic_light_id: 1},
      {datetime: Time.parse('2024-06-25 10:05:15'), type: 'blue honda', traffic_light_id: 1},
      {datetime: Time.parse('2024-06-25 09:55:45'), type: 'black bmw', traffic_light_id: 2},
      {datetime: Time.parse('2024-06-25 10:05:45'), type: 'green ford', traffic_light_id: 2},
      {datetime: Time.parse('2024-06-25 11:00:00'), type: 'black bmw', traffic_light_id: 1},
      {datetime: Time.parse('2024-06-25 11:10:30'), type: 'red toyota', traffic_light_id: 1}
    ])
    
  • Custom User Avatar

    I cannot pass the random test, it's always wrong, other previous tests ok, should I pos my code?

  • Custom User Avatar

    What does this sentence mean? "the total number of unique rentals they have made". Should inventory_id be different? But this column wasn't mentioned in (data that is needed for the task). Some rental has more than one payment. Should we sum them?

  • Custom User Avatar

    It's not a bug. In that case the runner's name is Second Runner.

  • Custom User Avatar

    Results [..] should be ordered by product_id (asc) and then by the sequence of the letters as they appear in the features string for each product.

    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()

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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)

  • Custom User Avatar

    The task is great! I would add a little note that a student can take the same course only once.

  • Custom User Avatar

    The term "previous week" refers to the time period that begins on the Monday immediately preceding the current week and ends on the following Sunday. This time period is considered to be the last complete week that has passed.

    A week here is defined to start on Monday and end on Sunday. it has to be complete, i.e. 7 days. the current day of the week is irrelevant to this definition: all days share the same "last week"

  • Custom User Avatar

    My solution relies on the ISO 8601 week number and would return wrong results if:

    • the tests included sales made in previous years during the week that shared the same week number as the last week
    • the current week is the week number 1 of the year, as I decrement by 1 to find the previous one, which would give 0, an invalid week number. (perhaps that one is impossible to catch)
  • Custom User Avatar

    Could you clealry explain that only developer_id=1 must be checked,
    or to drop records with develper_id = 2 from second random test?

    I hadn't found this in the description,
    so could not understand why my final test adds two extra records,
    then I made ugly cheat hack to open solutions,
    only to see - they all check developer_id=1 explicitly...

  • Loading more items...