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.
If you don't specify a language, answering your question is impossible. Help us help you!
But, have a look at the number of solutions for your particular language. All languages have multiple solutions, some numbering in the thousands.
Also,
performance
andoptimization
tags.It seems highly unlikely the problem is with the kata or the platform. It seems highly likely it's with your code. Which makes this not an issue.
Your
O(2n)
claim is impossible to evaluate without your code ( and would normally be writtenO(n)
because constants are uninteresting in this context ).Closing.
I agree. It fails on sample tests, but it passes when hitting submit. Any suggestions on how to remove it? Codewars isn't clear on how something like this is resolved.