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.
Sorry for offtop, but what software you used to generate this image? I was looking for something like that for a while
My solution is just an optimized version of permutating active tasks and calculating minimum time needed, so it's supposed to work.
How does your algorithm fare on this test case?
The current reference solution returns suboptimal answers in some cases, for example:
As shown in the Gantt chart below, the optimal answer is no more than
(4) + (5) + (6) + (7) = 47
minutes, while the reference solution returns48
.I would add test cases as this too. Not sure ref sol deals with those correctly. Such cases skip scheduled active tasks to give priority to future active tasks on other ingredient first, after an ongoing passive one.
I would keep repeated actions and other "meaningless" actions. A good algorithm should be able to deal with all of those.
I only saw your reply when I posted mine and the page refreshed. At least you got a second confirmation.
Excellent kata btw!
Yes, thanks for answering, 44 was my (incorrect) answer. I came to the same conclusion.
Is 44 your answer or the expected answer ? Because 39 seems correct to me.
13 + 21 + 5 = 39
Needs more random tests in general, making sure also edge cases such as specified in the other issue below are generated. I was able to pass random tests with an inferior algorithm because of good dice roll.
Needs more random and fixed tests with edge cases such as below, where we need to skip certain steps of some ingredients, to eagerly take a bottleneck ingredient first:
Oh I think I get it, 1,2,4 first, and then in parallel 3,5 <-> 6, then 7 and then 8. This makes this kata even harder than I expected. I've logged an issue about making sure to include such tests in random tests.
surely, this can't be right?
Great kata, I had a lot of fun solving it.
Loading more items...