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.
This comment is hidden because it contains spoiler information about the solution
How does the from_roman catch things like "IX" being equal to 9?
It would be more efficient to use
elif
s here rather than 3if
s, as if an earlierif
is true, later ones won't be.Your code is a pleasure to read! The most readable solution, congrats!
I want to ask a question. What does the bitwise operator '|' do in this code?
This looks so readable! I still have much to learn. Thanks
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I am new to codewars, how can I see the unit tests used when I press "Attempt" button? (not the ones in the "Sample Tests")
EDIT:
Figured it out, just need to print out the input array in the function and it will show up in the Log of failed tests.
Here is the "testUpAndDown":
capacity = 5;
input: ({3}, {2}, {0}, {2}, {}, {}, {5})
expectedResult: {0, 1, 2, 3, 6, 5, 3, 2, 0}
As you can see, your message and the information you gave are not really clear, for now... :o
This comment is hidden because it contains spoiler information about the solution
actually, it does matter, but you have to considere the direction wanted by the different people too.
I solved this problem in C++, I passed all the test cases but I could not submit my code.. Does it mean TLE or something? I couldn't see any warnings about it
Thanks. I feel the word "queue" in problem description is kind of confusing, it turns out that the order doesn't matter at all...
[0,1,5,6,5,1,0,1,0]
This one is REALLY well named... "Tricky queues". As long as you do not find the expected answer, that means you do not have the correct algo.
Loading more items...