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.
Dunder methods/functions disabled. Hope I made all my desired restrictions possible.
https://www.codewars.com/kata/reviews/69a9b1f48d42d192139fed97/groups/69a9b705074cb2990dbb796b
I've updated the description to clarify Rule 4, Bullet 3. Since the lobby has a Strict Queue (Rule 2) and guests cannot skip each other, an elevator must depart the moment the next person in line belongs to the other elevator, as they are effectively 'blocking' the lobby floor.
Hi everyone! I've completely rewritten the solution and updated the description to correctly handle two simultaneous elevators. The kata is now republished. Thank you all for the detailed feedback! I have also fixed every other issue. Please make sure that it is working correctly. Thank you everyone!
You're completely right, the description contradicts itself! Rule 4 says an elevator departs when the next guest belongs to the other elevator, but in steps 4 and 5 both elevators are loading simultaneously and B only departs at end of queue. I've rewritten Rule 4 to be clearer. Thank you for catching this!
Done!
Done!
Hi! I have completely rewritten the solution to correctly handle two simultaneous elevators. Both failing test cases now pass:
[138, 17, 85, 47, 117, 68, 117], 499 → 5 ✅
[10, 17, 71, 109, 36, 16, 36, 142, 22, 142, 104], 364 → 4 ✅
I have also updated the description, reference solution, and example tests. Could you please mark the issue as resolved so I can republish? Thank you!
I added some more mid-length cases in the Example Test Cases to make it easier to debug. Please make sure that it is still working correctly.
Should I add 5 example test cases in the range of 10-20?
Ok sure! I will add the extra cases after I get back from school. Are there any other issues?
I'd also add a few more sample tests in the range of
10-20people. Debugging>100people is a chore.Fixed, thanks.
This comment is hidden because it contains spoiler information about the solution
C Translation
Loading more items...