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.
I gave up in the end! I wanted to see the solutions! Haha, I thought I was looking at the right calling convention, but apparently not.
Ahhh thankyou! I'll use that in the future. Is it possible to get previous solutions from the challenge?
This comment is hidden because it contains spoiler information about the solution
Can someone confirm if this works or not? I'm using attribute((noinline, optnone)) on my function and still there are no arguments in the stack. Does this Kata even work anymore? Or has it been broken with an update of the servers or something? I don't mind carrying on, but if the arguments aren't there in the call stack, where on earth are they? And how are we supposed to know where to find them?
I agree that this should be higher than 4kyu. I have also learned a lot, but it seems like this problem is damn near uncompletable now. Has something changed? I'm printing everything in the call stack and I'm getting no extra arguments. Where would they be stored if they're not on the stack?
I'm reading the call stack for the arguments, but I can't see them anywhere. Is codewars definitely following the Linux calling convention?
I can pass all the tests, and my attempt take 7ms, but I'm getting numbers way too big for unsigned long long. Has anyone else had this problem?
This code is really tight and pretty. What's your strategy for making your code look so nice? Do you follow any rules or principles?
Great fun! Please improve the description though, it's not immediately clear what you want us to do.
Agreed! I also think the order of the arrows should be changed. Saying "X1 -> ... " means, to me, "with the input X1 you get the following". But the author actually means "X1 is dervied from...".
This should be changed to match the common mathematical usage of "->".
I think the goal is to test your C and algorithm skills. A lot of the hardest computer science problems have solutions that involves maths. I guess that's just the way it goes!
How are you 6kyu with a solution like that! Very nice.
Make sure you're not computing every number in your array needlessly!
What do I need to do to avoid timeout? I have a solution that can run all the tests (in C), in about 1.6s. How can I speed this up?
I bet all you recursive function writers are feeling pretty smug with your tight 10-15 lines of code.
But before you get ahead of yourselves, think of this, C is more efficient with iterative code! Ha!
So my 140 lines of iterative code probably run at least 1.2 times faster, and it only took me 10 times as long to develop!
Ha! Hahaha... ha.. sigh.
Loading more items...