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.
How can this be a best practice when it doesn't allocate enough memory?
The check
if (b!=0)
seems like a good idea at first sight - but what does the function return ifb
is zero?If your function type changes in C you'd better rewrite your code however. What if it becomes a string? There is a problem to solve, with specifications, makes no sense to assume if whatever could happen.
I'm thinking of maintaining the code - works for this solution - but not a best practice
Why do you want it to change?
This seems like a bad practice as it relys on being an int, if the function were to change to be a float/double then this wouldn't produce correct answer.
amazing thankyou!
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
Thanks!
It's very good Kata. It was really challenging to find solution that is not brutal force. I think you should create another similar Kata and ban the possiblity of solving it by brutal force.
Thanks!
very nice kata.
specially the test cases were too good covering all possible failures.
Loading more items...