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.
Tests are being generated incorrectly. For example, eigba expects true.
The description should explicitly state that the price should be rounded, rather than truncated.
Oh cool, you fixed it. Thanks!
The description states that
citiesOffered
is "a list of cities that will host SECSR conferences this year", and then goes on to state that "SECSR organizes at least two conferences each year". That seems to state thatcitiesOffered
will have a minimum of two elements. Despite this, the kata is testing whether the function works with empty arrays. Either the description either to state explicitly that the function needs to handle empty arrays, which doesn't make sense given the way the problem is explained, or the kata shouldn't be testing with empty arrays as inputs.\x is an ES6 way of using hex values. The contents of that first array are just various strings with the characters represented by unicode hex values. So the first element is "use strict", the second element is "length", etc.
What the flip? Is this written in assembly or something?
In the kata, my code calculates Math.cbrt(1728) === 11.999999999999998 instead of 12. (I'm writing in JS). The web app I use to test it (repl.it) does not have this same error, which makes it kind of hard to debug. I assume that it's some kind of floating point error related to converting between binary and decimal, but that's all I've got. Does anyone have any advice on where I could find some resources on this, or what this kind of issue called so that I can look it up myself.
Beyond that, does anyone smarter than I have a reason why this error is present on CodeWars but not repl.it?
Read this: https://en.wikipedia.org/wiki/Memoization
This basic gist of memoization is that it's inefficient to do the same calculations over and over again. Instead you do those calculations once, and then store the result of those calculations somewhere so that you can look them up instead of having to do the calculations again.
This comment is hidden because it contains spoiler information about the solution
It's a ternary operator (http://www.w3schools.com/jsref/jsref_operators.asp) in the callback for the filter function (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) written as an arrow function (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions).
So I guess I could have also written 'el => el > n[pivot-1]', and it would have done the same thing, but I didn't.
The description for this kata says that the input will always be a positive integer. However, the inputs include zero, which is not a positive integer. Either change the description ('input is always an integer greater than or equal to zero') or remove zero from the test cases.