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.
You don't need to
apply map
here. Map will pass progressive values accross multiple lists, so long as the function accepts the requisite number of arguments.Contrived example, but should illustrate the point.
I'm a clojure newbie. So, in clojure it doesn't matter if the type is sequence or vector as long as they can be used the same, right?
with this you can even stop it from being a function an just express it directly
Seeing same thing on Clojure side
Thanks for looking into this, Abbe. I'm no longer seeing this problem.
I looked through the test cases and I can't see how the combinations you list could appear.
I guess you found them during the first batch of random test cases, but there the first parameter to
is-merge
is always either "Can we merge it? Yes, we can!" or "Can we merge it? No, we can't".I even ran through the test cases 10 times to see if I could recreate the problem, but it seems to work fine for me.
Could it have been a temporary hiccup on the servers?
Please try again and let me know if you still see the same problem.
It does look strange, indeed. I'll try to look into it later today.
Thanks for pointing it out. :-)
I'm not sure if I'm missing something, or there's a problem with the generated test cases. Here are a few generated test case inputs that look to be expecting "true".
(is-merge "mrg it? Ys, can!" "rei? Yes, a" "mg tcn!")
(is-merge "it? Yes, wcn!" "t? s, cn" "iYewe !")
I would expect these to return "false", but maybe I'm not understanding something...
This comment is hidden because it contains spoiler information about the solution
Nah, he's calculating the number of kittens. Seriously, some of your comments are completely off :D. But for those, who're interested, g964 means "Do you memoize the whole Fibonacci tree? That takes too much memory. There's an approach that takes O(log n) operations to get the nth Fibonacci number, which should help you to finish in time."
Maybe you are calculating a bunch of Fibonacci's numbers?
Kind of. There's definitely a limit in Haskell, Python and Javascript, although I'm not certain of the actual numbers.
Speaking on the Clojure version of this kata, I'm having problems getting this test to pass for large n. Locally, my tests pass without running out of heap.
I created a test for n=77911, and the test passes no problem locally, but I'm met with a "java.lang.OutOfMemoryError: Java heap space" when running on codewars.
Could this have something to do with how the JVM is configured? If so, do the non-JVM versions of this kata have similar restrictions?
@g964: does it makes sense to update the Instructions with this information?
I don't see why you got "expected fractions" with denominator 136240, the "expected result" is with a denominator of 34060.
Aren't you confused between "expected" and "actual"?
Read the post from jacobono below. Seems you have lots of problems with my kata these days!:-)
Loading more items...