Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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.
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.
Thanks #SaladFork - I have amended the description to remove the ambiguity
Glad you enjoyed it
Also I will beef up the testing to prevent that sort of cheating - thanks for the heads up.
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.
Thanks normalalien - I have modified the description accordingly
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.
Thanks for your feedback - appreciated. I'm not quite sure what you mean - could you expand a little please
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.
Thanks very much - appreciated - I'll see if I can fihure it out
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?
Thanks Thomas - I will sort that out.
Well that's made me happy - thank you
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...