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.
it is not wrong, I copy pasted the formula and starting stats from description and it worked like a charm
Well, I GUESS that's an option too.
You can just use var keyword for java 11, without needing to import Annotation
It's basically just alternation case but twice. The reason why it seems harder is because you tried to optimize your algorithm, such as trying to do it in one loop.
You should put that in fixed tests too in the sample test section.
Doc on random tests for your reference
Thank you! Not sure how to make random tests but I will look into that. Also, could you clerify what you mean in the second comment. Do you mean something like -9 * -9 = 81. I am testing for that. If you mean that a negative and a positive make the largest negative product I do not test for that because this is meant to test for largest positive product. Or let me know if I am misunderstanding. Thanks!
Thanks for the feedback! I think there is a bit of confusion here. This is looking for the largest positive product. [-7,234] would result in the largest negative product. Hope this helps.
This comment is hidden because it contains spoiler information about the solution
Just treat input as string and not a number.
This comment is hidden because it contains spoiler information about the solution
Harder than i thought... in Javascript with time constraints.
But interesting to solve.
In java it's much easier with timeout as it seems.
[0, 0]
is not a valid answer. Please mark your post as having spoiler content next time, and read this: https://docs.codewars.com/training/troubleshooting/This comment is hidden because it contains spoiler information about the solution
If we add some validation in js like code must contain minimum one of each ["$","{","}"] and two ` - tests will be more precise;
I think its nearer to 6 kyu, took me some more time than was expected.
Loading more items...