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 think you're right. I think the solution would be to add condition at the beginning that allocates n*sizeof if n>=3 otherwise 3*sizeof.
This comment is hidden because it contains spoiler information about the solution
Hello there. I'm always looking for the very best
coding tasks
. Can you please list your 10 favoritecoding tasks
that you have found so far on this site? Thanks.Ah, well the great thing is that you resolved it on your own :D
The test seems correct. The question is why it's returning 10 in your case, if it returns 6 in 'test' cases, as you say. The only reason I can see for that is that you're using some sort of global variables, or maybe going past the end of string.
I think the fastest way we're gonna resolve this if you post your code here. https://github.com/Codewars/codewars.com/wiki/Markdown-Formatting#block-code-formatting shows how to post code that looks good in comments section. Don't forget to mark your post as having spoiler content.
That doesn't really seem possible. But C translation has nice enough messages: could you copy paste what you're seeing? For example:
But what inputs are you working with? If you can show an input string, expected result, and your returned result, then we can start discussing stuff. Until then, it's anyone's guess...
Are you modifying your inputs and are the tests vulnerable to that ( both are bad )?
Or are you somehow retaining state between tests?
Could you elaborate in a bit more detail? 13 C completions so far, mine included. Didn't encounter any issues, so it's probably a mistake in your code. Try printing the input and debugging from there. This article: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution has some basic answers to your questions :>