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.
so this kata could be a Java translation on that one
Retracted because this kata is a duplicate.
This is a 99% duplicate to https://www.codewars.com/kata/582aad136755daf91a000021 with slight, trivial differences.
Kindly, review - https://www.codewars.com/kumite/629e150fca718c0038e99a2c
Would it be more appropriate to return
org.apache.commons.lang3.tuple.ImmutablePair
class instead of array? Or at least use an empty array for negative cases?Returning nulls for arrays and collections is considered to be a bad practice in general.
I guess it's later now. Author has been inactive ever since.
Already fixed. I don't like looking at translations of katas with active authors because there already are lots of translation with inactive authors; maybe later...
You may have to fix this yourself ( if it isn't already fixed - I really can't tell. I don't know the difference between an interface and a class ).
Would you?
( I also have a Haskell translation available .. would you? )
Haskell translation
If you don't know, my suggestion would be to not introduce a performance requirement until you feel confident about doing so. Kata don't always need one; it is perfectly acceptable for a kata to be an algorithmic challenge instead of a performance challenge as well. And correctly adding a performance requirement is not a particularly easy task.
Meanwhile, you could scour the docs at docs.codewars.com, there are some articles related to performance requirements there, and if you solve some more kata you might come across ones that actually have them. ( Read the comments on there and you might gain some insights on how to do it, and also how not to do it. Plenty of authors have done it the wrong way, and learned hard lessons. )
Unrelated: if nobody can find an actual duplicate, this might simply not be a duplicate. I quite like the particular take on the general problem actually ( maybe even especially without a performance constraint ). :]
I can't find either. Maybe I thought about some of these:
https://www.codewars.com/kata/5aa69e68ba1bb5ecdf000557
https://www.codewars.com/kata/5f120a13e63b6a0016f1c9d5
https://www.codewars.com/kata/55b54be931e9ce28bc0000d6
Sorry if this seems like a dumb question, I'm relatively new to this. How would I add a performance requirement?
That's a totally different task.
There is something much closer, I seem to remember that as well. I'll do some searching.
ETA: Nope, can't find it. That doesn't mean it's not there; it may just not have a descriptive name.
There's one for Max Average with performance constraints:
https://www.codewars.com/kata/60228a9f85a02c0022379542
Anyway, question has been resolved.
O(n)
passes. This task seems familiar, I think there already is a similar kata with performance requirements.Loading more items...