Ad
  • Custom User Avatar

    Thanks MattC - you're right, unfortunately I haven't been able to devote too much time to this lately - I will add some next time I get the opportunity.

  • Custom User Avatar

    Hi there and thanks for your feedback - I appreciate it.

    I have changed the 2nd paragraph as follows:

    Dave isn't a confident driver and is unwilling to reverse the cars so he operates a FIFO (first in first out) system. When the car park is full, the 2nd car in will be blocked until the first car leaves, at which point Dave will move the 2nd car up to first and the third up to second making a space at the back for the next car to arrive.

    Hope this helps.

  • Custom User Avatar

    Thanks #SaladFork - I have amended the description to remove the ambiguity

  • Custom User Avatar

    Glad you enjoyed it

  • Custom User Avatar

    Also I will beef up the testing to prevent that sort of cheating - thanks for the heads up.

  • Custom User Avatar

    Hi FrankK - thanks for commenting.

    In the last test case the 5th car is blocking the next two cars from exitting - don't forget it's first in first out.

    This means that the last three cars will be turned away.

    So this is not an issue, 3 is the correct answer.

    Also if more than one car turns up at the same moment, just take them in the order that they come - really the exit time is more important.

  • Custom User Avatar

    Thanks normalalien - I have modified the description accordingly

  • Custom User Avatar

    Thank you so much for taking the time to not just complete the kata but to test my testing.

    I would not have thought of circumventing it in that way - I will now.

    I have incorporated your random test which is similar, but far superior to mine, and re-published.

  • Custom User Avatar

    Thanks for your feedback - appreciated. I'm not quite sure what you mean - could you expand a little please

  • Custom User Avatar

    Thanks for your comment - much appreciated.

    You have to turn a car away when the car park is full, iow when there are already 3 cars parked there. You can determine this from the arrival and departure times of each car.

    I have amended the description to make this clearer.

  • Custom User Avatar

    Thanks very much - appreciated - I'll see if I can fihure it out

  • Custom User Avatar

    Hello - I'm frustrated perhaps you can help. I have created a solution using the FSM referred to and the example test cases are all fine.

    When I submit I get:

    Type checking
    Expected: true, instead got: false

    Can you give me a clue as to what this is please?

  • Custom User Avatar

    Thanks Thomas - I will sort that out.

  • Custom User Avatar

    Well that's made me happy - thank you

  • Custom User Avatar

    Thanks for your feedback -appreciated. Originally the function was going to be called dontBother (as in: don't bother turning up) but I changed the name at the last minute as it seemed to make more sense.

    Sadly I missed the initial solution.

    Fixed now.

  • Loading more items...