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.
The description warns you:
that's the main issue. when you fix that, that test will work (but another is still failing, there are some out-of-order calls). In any case, that's a problem with your code , not a kata issue
is never a good argument, especially not with threading and concurrency ;-)
Hi, I had the same problem. Locally my code is running properly, println() prints numbers from count() method in correct order, but tests say that I return an empty array.
The testTrickyQueues test data looks like this
And expecting
new int[]{0,1,5,6,5,1,0,1,0}
Let's work thru the first few floors...
0
going UP1
who wants to go to floor6
. They get in. Lift contains {6}5
wanting to go to floor6
. Three people get in. Lift contains {6,6,6,6}. Still going up.6
. Everybody out. This is top so now lift will go DOWN.5
wanting to go to ground. Those three get in. Lift contains {0,0,0} and is going DOWN*...
You can see that so far the lift has stopped at FLOORS
0,1,5,6,5
.... which is the first part of the required Kata answer.~
I leave the rest as exercise for the reader ;-)
Cheers!
@Álex Vega Don't forget the spoiler flag.
This comment is hidden because it contains spoiler information about the solution
The given property (P) is correct. If there were an error I hope somebody would have seen it before you:-) Did you give it a try?
java.
But I just checked and the ref solution returns false for this input.
@dawidszewczyk: that's not the input that caused your solution to fail. Check that you're logging appropriately in your code (like, do you have an early return before you might log?)
Invalid issue, closing. But if you actually find one, plz continue the discussion (with other inputs, but double check that's the correct one and that you didn't mutate it before you print it)
cheers
What language?
'Means your structure must be wrong somewhere. Note that you don't need that version. The regular/simpler one is enough.
EDIT: isn't there a builtin in java about that? or at least something you can build on?
I am not getting stack overflow with your code?
If you are indeed struggling with stack overflow, I would go in one of two directions:
You're misunderstanding the error message, in Java, it adds those brackets to show where is the difference in the strings. It says:
You're removing spaces at the front too.