Ad
  • Custom User Avatar

    C Translation (author inactive).

  • Custom User Avatar

    If you change tests in a way which makes existing solutions not pass anymore, then such solutions will be marked as obsolete. However, users who submitted them will not lose any points. It is generally OK to add tests and invalidate some solutions if tests are incorrect and do not conform to spec.

  • Custom User Avatar

    -- Java version of the kata --

    The kata details state that inputs are not sorted. My tests have shown that at least one of the successfully submitted solutions is not correct.
    This would be detected if a test was added for the following input (expected result: 3):
    new int[][] {{10, 11}, {1, 8}, {6, 9}, {5, 7}})

    I have a general question (sorry if it is not an appropriate forum, I am new here)

    • Adding sort to existing solutions will make them correct, but also will affect performance, so some of them might no longer be viable... Would a new test somehow invalidate solutions that are already submitted?
  • Custom User Avatar

    Haskell translation

    The description has been updated, adding a primer on generating random numbers, as it's a bit more advanced for Haskell than for other languages.

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    Wow that is embarassing. Thank you for pointing out my error. I was certain that I had counted all 15 requests in my solution. I am ashamed of myself.

  • Custom User Avatar

    That is only 14 requests. I figured you'd be too focused on checking that they didn't overlap to notice that one was missing, but by distributing them manually you wouldn't lose one of them due to some oversight or bug in the code that you wouldn't manually reproduce since you'd be aware of every step carried out.

  • Custom User Avatar

    I appreciate your patience with my ignorance. I solved the above example by hand and came out with the exact same taxis as above:

    taxi 1: (3, 10), (14, 22), (26, 30)
    taxi 2: (8, 10), (16, 26), (27, 29)
    taxi 3: (9, 18), (19, 20), (21, 30)
    taxi 4: (16, 26), (29, 30)
    taxi 5: (17, 25), (29, 30)
    taxi 6: (19, 28)
    

    How are these not "distributed" correctly?

  • Custom User Avatar

    Yes, but you didn't distribute the requests between the taxis. Yes, check it by hand. Better yet, solve it by hand so that you are actually checking that it's solvable rather than looking at the solution and failing to find a problem (which doesn't mean there isn't one)

  • Custom User Avatar

    I listed the six taxis above. The number of requests is small enough that it can be checked by hand, and while I may have missed something, I do not see any mistake. All 15 requests are satisfied with the six taxis that are show in my post.

  • Custom User Avatar

    You won't be able to distribute them between six taxis so it should be easy to figure it out why that's wrong

  • Custom User Avatar

    My code passes the basic tests and most of the small random tests, but on some tests it says I am off by one taxi. In the example below, it says there should be 7 taxis. I don't see how they are getting 7 taxis. What am I missing here?

    Requests:  [(19, 20), (9, 18), (8, 10), (17, 25), (27, 29), 
                (16, 26), (29, 30), (26, 30), (19, 28), (21, 30), 
                (29, 30), (19, 28), (3, 10), (16, 26), (14, 22)]
    Number of requests:  15
    
    Number of taxis:  6
    Taxis:
    [(3, 10), (14, 22), (26, 30)]
    [(8, 10), (16, 26), (27, 29)]
    [(9, 18), (19, 20), (21, 30)]
    [(16, 26), (29, 30)]
    [(17, 25), (29, 30)]
    [(19, 28)]
    
  • Custom User Avatar

    The fork was already approved by someone. However, I have now made it into blocks as per your suggestion in this fork.

  • Custom User Avatar

    approved

  • Loading more items...