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.
It's been a year. If it hasn't been fixed, it won't be fixed. Closing the issue.
The "i" means case-Insensitive
This error means that you're trying to loop through something you can't loop through, like
for i in 8:
doSomething()
This doesn't makes sense, so Python gives you a TypeError. In this case, the simple problem is that the problem wants you to find how many
x
s are inxs
, not the other way around! Switch your line to:def number_of_occurrences(xs, x):
and you should be good.
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 really like this solution because you're only looping through walk once.
No idea what you're saying.
PSA: If n > 12, you must throw an IllegalArgumentException/ArgumentOutOfRangeException.
Um, there's kinda no Test Cases for Haskell.
A little nitpicky, but you only need to run &block on each element once, not twice: find list.select(&block) as var, and then return as the second element all elements in list and not in var. If &block is expensive, it might be desirable not to run it twice.