Ad
  • Default User Avatar

    it took a while to understand the task, although the solution itself is not at all complicated. very good kata

  • Custom User Avatar

    confidently incorrect a-holes are my favorite type of issue raisers :D

  • Custom User Avatar

    No, you're wrong. Not a kata issue.

  • Default User Avatar

    The problem is nice, because of it's story with a broken ferry. I like stories.

    Noticed that there is certain ambiguity in the formulation.

    1. it is not so obvious what would trigger the ferry to travel to the opposite bank.

    A car may arrive at either river bank to be transported by the ferry to the opposite bank.

    So the cars are not initially waiting in the queue, but might come

    The cars are loaded in the order of their arrival;

    So if some car comes on the oposite bank the ferry must pick it first

    In the meantime, lines of cars formed on both banks that await to cross the river.

    So the cars are already formed some lanes

    in first two sentences sequence of arrivals:

      {"left",10},{"left" 20},{"right",50},{"left",9}
    

    should trigger 3 moves

      {"left",10},{"left" 20}
      {"right",50}
      {"left",9}
    

    while last prioritise this solution:

      {"left",10},{"left" 20},{"left",9}
      {"right",50}
    

    The last solution was chousen to be correct by the author. It would be good to specifically highlite that given
    std::vector<std::pair<int,std::string>> loads is the queue which is already waiting in the loading areas, ordered by the retrospective historical time of arraival.

    1. Another point is: "what to do if any particular car is begger than the ferry?"

    The test cases are not covering such point, but probably it is worth mentioning in the description.

    1. And also names of the banks "left" and "right" is not it better to shorten those to char 'l' and 'r' or even make bool?
  • Default User Avatar

    I love this one, easy to understand

  • Default User Avatar

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

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Custom User Avatar
  • Custom User Avatar

    Approved

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Default User Avatar

    .

  • Default User Avatar

    Sorry, this is a translation for Rook Count Attack. I don't know how it ended up here!

  • Default User Avatar
  • Default User Avatar

    This is dumb and also wrong

  • Custom User Avatar

    Approved

  • Loading more items...