[Community Puzzle] Mrs. Knuth - Part II - Puzzle discussion

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @Timinator,validated by @yhuberla,@darkhorse64 and @Malleek.
If you have any issues, feel free to ping them.

I’ve been naughty here and didn’t follow the dancing links approach exactly but my solution was only occasionally hitting over milllisecond in time to find a working schedule. Except for the first setup which I blame on start-up time because that’s hitting 25ms which is huge compared to the rest.

But after submitting the code apparently fails on the last validator, number 11. And now we get to my biggest issue with Codingame, not specifically this puzzle. There is no information about the failure. Timeout? No schedule found? Wrong schedule found? I can’t add my own logging afaik so what am I trying to optimize here? It’s failed at something. Heck, it may even be the formatting because of some weird name/instrument combination… I’m not exactly motivated to address that at this stage and that’s just a shame for an otherwise well-designed puzzle.

I see you are Level 20. You should be able to click on “view the contribution” when you have the puzzle open. Copy your code to the new IDE that pops up and run it there where will you will see all the test cases and all the validators.

Let me know what you find out about this unfortunate situation.

1 Like

Thanks Timinator for the quick reply and the hint. I wasn’t able to find that button/link on the main page of the puzzle or in the editor screen, perhaps because I haven’t solved it. But my level does indeed grant me access to contributions so I just went that route.

Just running that final scenario a few times shows it taking just under a second to generate the schedule in my local IDE so it’s probably just a time-out that triggered the failure. Obviously I’m very curious why this was that much harder to resolve for the algorithm than the regular tests. But at first glance I think I do see a bit of a pattern here that may explain it.

I’ll check where I can leave feedback that the validator page is just too barebones. If the validators are to remain secret, fine, but the reason they fail shouldn’t be, especially for a time-out.

Thanks again for the quick and helpful response and well done on this great puzzle series! I will at some point take the time to write a C# template that implements DLX, but it’s not going to be fun in a verbose language, or I might just translate the existing Kotlin (aka new C#) one.

1 Like