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.
The error is just a mismatch of one number stored in one variable. Read the last 2 command of the description ^^
OP solved it, closing
This is the best practice , not clever. If you are looking for the clever solution, look at that one - https://www.codewars.com/kata/reviews/59958a4aaca36cc0f1001e32/groups/5f5e0605e0be5a00011aaa89
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce
excuse me, for what is that 0 after the current? inside the reduce, im trying to get it but cant :/
why two times map if u can transform data in reduce loop
Formidable!!
Also, even if you had to go through the array twice that's 2n wheras nlogn still takes longer for large n. And in any case 2n is O(n).
You should print the input at the start of your code! :)
Honestly, the "Input will only contain lowercase characters and whitespaces" doesn't help at all. It led me to be confused about why you wouldn't mention that white space should be ignored even though the example ignores it.
Be clear and say what you mean. Say "White spaces should be ignored". Bling4Basics answer to lead the warrior wastes people's time with looking to the comments.
Thanks for creating this in any case.
Can anyone please explain (min !== 0 && set.has(min * -1))? Specifically set.has(min * -1).
Thanks for your post. Good to double check but the first random testing function is no more there. I used in it something like
expect_equal(matrix1, matrix2)
. I replaced it by something like the fixed tests function. Tell me if you find something!Our returns have the same elements but were not taken as the same.
now it passes all the tests!
thank you. great kata!
btw I am double checking your solution to see what might cause the error
Doesn't seem easy to test matrix equality with expect_equal. I changed a bit the random testing function. Could you tell me if it works better for you now? (My solution passed the first version of random tests without problem but is it a proof?)
New publishing seems to take long.
This comment is hidden because it contains spoiler information about the solution
Loading more items...