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.
good job on the persistence
My solution still works, some other solutions still work for all available java versions, many solutions work with java 8 and fail with java 11.
I'd say its still solvable, but for java 11 is either harder, or requires different steps than for Java 8
@wayne1512. LOL. Well, I warned you about that in the Kata description!
Kudos for seeing it to completion.
Haha totally feel you! I have two such challenges which I've been thinking on for years! Managed to complete one, but Voronoi cells kata is still waiting :D
@wayne1512.
First, it seems you didn't read the description (at least, you didn't do it correctly). Second, it's almost impossible to answer to your question since the context is lacking like half of the constraints of the problem. ;)
maybe because, as usual in java, there are getters for that? :p
Your solution posted below is failing tests 2-5. Then reaches timeout during test 6. The solution also timeouts even if tests 0-5 are skipped.
I already warned you for a performance challenge when I had almost the same solution as you have. You are using constructs/elements that are not fast enough. Whith a little bit of creativity this is a solvable kata. Try to find different faster constructs/elements and you will succeed.
Put your code inside triple backtick to make it readable:
The author's solution and accepted solutions that I tried doesn't timeout.
We've reduced it because the new runner performs much better. Also, 20s was set for more complex challenges on Qualified.io. 16s should be enough for this challenge.
I'm not sure I understand what you mean, but I guess you're asking about the order of the bytes read and written. If your example represents a timeline of calls to write() and read(), it's correct. The calls to flip() are missing though.
I'll mark this question as resolved. If you have other questions, let us know.
Yeah, the sequence of writing and reading must be te same.
Be prepared for a performance challenge.