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
This comment is hidden because it contains spoiler information about the solution
This is pedantic but the description does say:
Although the test cases doesn't test for the amount of parameters, this solution would technically be incorrect as it accepts 0 to N parameters.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The wording of the description was a bit unclear. It took me a while to understand.
Maybe its just me, but reading that it should return
True
if your friend can figure out you are fooling him implies that False would mean that your friend can't figure out you are fooling him, but the description provides an example where you don't even try to fool him.I'd add a another example where it returns
False
but because your friend can't figure out that your fooling him, like the test"ping","pong", ["p","n","g"]
I don't like too much this implementation. It has multiple calls to
.index()
which from my understand will iterate over the deck lists until it finds the element. So worst case scenario, it iterates over the same list 4 times. In this case the deck list is short so performance is no problem but it could become a problem with longer lists of cards.@domingomesajr but it passed the tests, so there is no error.
This comment is hidden because it contains spoiler information about the solution
That really depends on the length of the strings you are going to be processing and your hardware, but now a days memory is cheap. The context of this problem is comments, there is usually a character limit, let's say you have a 1000 character limit, Then at best you'll be allocating 1kB for the comment and another 1kB for the answer, thats 2kB total. On the other hand if you count the number of non-vowel characters you are going to check the string twice no matter what and in the worst case scenario you are going to be allocating 2kB either way if the comment doesn't contain any vowel. It's a trade off, you are saving a little bit of memory for processing power.