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.
Man, I hate to be rude, but this kata is just loaded with issues.
First off, the instructions are extremely difficult to understand. They should be re-written. It's impressive that you can write coding problems in a language that is not your first language, but based on the way the kata is written, this should not have been approved.
Second, the random test cases, do not show you which cases are failing, and this makes it extremely difficult to debug my code.
Clean solution, but you're running the loop again every time on a.includes(-e), so the complexity is O(n)^2.
Cool solution, but pretty inefficient because you're cutting two new arrays at each index.
This is getting labelled as clever, but I really think this is the best es6 solution I've seen.
Can someone explain how this works?
I see this as great ES6!
This comment is hidden because it contains spoiler information about the solution
Instructions are extremely unclear. Not a fan of this one.
This is an awesome ES6 solution. Nice work.
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 works, but trust me, a regex solution would make the code a lot cleaner. It's easier to learn than you would think. Consider giving it a shot.
This is getting marked as clever, and not best practices by a lot of people. I think it's best practices. indexOf() returns -1 if the element isn't in the array, and returns the index of the array if it's in there. This is saying return true if you find the index, and return false if it's -1. You could also use "!== -1", which is virtually the same thing.
includes(item) is definitely valid, but we're practically building that method.
This is a great solution, but there are a couple of easy fixes that could really clean up the code. You can return 't==o' instead of '(t==o)?true:false;' because it will automatically generate true or false.
This comment is hidden because it contains spoiler information about the solution
Loading more items...