your function listen() clashes with POSIX's listen(). Criterion is probably using listen() somewhere for inter-process communication and calls your function instead, leading to a crash. Rename it, and your code will pass.
I wrote my solution in C, but the test program is crashing, the problem is in the libcriterion.so, there is some way to attach the gdb on it and see what is going on?
Just in case, i wrote this simple function to verify my code locally and all sample tests are working!
You are right. I know you are not supposed to 'invent the wheel again' but this exercise is great to learn algorithmic thinking and complex concepts like recursion.
I think it's better to use this space to do what you wanted to do at first. This is a great exercise to understand and practice algorithms and recursion
yeah that's the way she goes sometimes. i do these challenges just to nail into my brain the kinds of built in functions you can use, because I hate doing what you did and realizing I spent so much time for no reason. A good rule of thumb is that for 7/8 kyu problems, you generally don't have to reinvent any wheels.
I think it would have been better if you had tried to get to the algorithm properly. You would have learned more. Using the solution is good when you already know how to get to the solution.
your function
listen()
clashes with POSIX'slisten()
. Criterion is probably usinglisten()
somewhere for inter-process communication and calls your function instead, leading to a crash. Rename it, and your code will pass.I wrote my solution in C, but the test program is crashing, the problem is in the libcriterion.so, there is some way to attach the gdb on it and see what is going on?
Just in case, i wrote this simple function to verify my code locally and all sample tests are working!
This is the error, as i can't attach any debbuger i can't see what is in those addresses:
I think there're lots of fake users vote for this solution by best practice why ?
Lua translation!
This kata is overrated - it feels like it belongs to the 6th level (at best)
=_=
I'll say, but keep in mind that this approach is more concise and efficient than your method, especially for larger numbers.
Wow... that's insane
You are right. I know you are not supposed to 'invent the wheel again' but this exercise is great to learn algorithmic thinking and complex concepts like recursion.
I think it's better to use this space to do what you wanted to do at first. This is a great exercise to understand and practice algorithms and recursion
yeah that's the way she goes sometimes. i do these challenges just to nail into my brain the kinds of built in functions you can use, because I hate doing what you did and realizing I spent so much time for no reason. A good rule of thumb is that for 7/8 kyu problems, you generally don't have to reinvent any wheels.
Wut?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
good though
I think it would have been better if you had tried to get to the algorithm properly. You would have learned more. Using the solution is good when you already know how to get to the solution.
Loading more items...