Very interesting kata! However, I believe two improvements could make it better:
a) The use of external libraries should be disabled. Currently, it is possible to solve it with something like bignumber.js, which makes it feel more like a 6kyu kata.
b) It would be helpful to specify that BigInt is not allowed in the JavaScript version, as others have suggested.
Issue: imho, instructions should explicitly say that all the numbers in the list provided are positive (if the list provided was including negative numbers, most of the solutions would need to be different).
Hope that can be solved. For some people it can be a trivial thing.
For many others (specially considering that this is a 7kyu), it can be non trivial and prevent them from solving the real challenge.
I believe instructions (or sample tests) should be much more explicit with the requirements.
Some examples:
isBalanced("(Sensei) says [something]", "()[]") // can a pair be closed before the second one ?
isBalanced("(Sensei) -says- [something]", "()--[]") // can expect more than two pairs ?
isBalanced("(Sensei says something)", "()ss") // can the pairs be any charachter? -is it safe to filter letters from the initial string?
This is a 7kyu kata and, oviously, warriors are not supposed to implement MD5 algorithm themselves.
But, unless you've done the previous kata in the collection, it is not really obvious that you can import external modules -I've solved 40 katas on Codewars and it is the first time I see it (TBH I didn't even consider that was possible).
Suggestion:
Add this text at the beginning...
Before you do this kata, it is recommended that you solve the first kata in this series: Node.js Intro
... and include the following tip:
Tip:
Remember that you can include the builtin require function to include external modules (you're not expected to implement MD5 hash algorithm yourself, there are many modules that can do that for you).
Codewars currently uses NodeJS v8.1.3 (you can check the version at the top of the Kata screen: there's a drop down allowing you to choose language + a dropdown to choose the version).
Instructions for this kata should actually include an additional example to explain that a word can also be an anagram of itself.
Eg:
There is 1 anagram in the array ["abc", "xyz", "foobar", "abc"]
It is an important factor because implementation can be largely simplified (you can sort all the words of the array at the beginning and then just count the number of words that are equal).
Instructions should explicitly say that the function will receive 2 arguments: the list of cogs AND the index of the cog that rotates at 1 rpm.
(at the moment, you can kind of guess it but for some it may be confussing)
Very interesting kata! However, I believe two improvements could make it better:
a) The use of external libraries should be disabled. Currently, it is possible to solve it with something like bignumber.js, which makes it feel more like a 6kyu kata.
b) It would be helpful to specify that BigInt is not allowed in the JavaScript version, as others have suggested.
Issue: imho, instructions should explicitly say that all the numbers in the list provided are positive (if the list provided was including negative numbers, most of the solutions would need to be different).
awesome!
Suggestion:
Instructions do not explain what the function is expected to return.
I think it is important to explain that in detail (specially considering that this is a 7 kyu kata).
For example:
TypeScript version fails to compile (missing export).
Reported here: https://www.codewars.com/kata/57dd3a06eb0537b899000a64/discuss/typescript#63ac76683f04b10031696cc6
Hope that can be solved. For some people it can be a trivial thing.
For many others (specially considering that this is a 7kyu), it can be non trivial and prevent them from solving the real challenge.
Bug in TypeScript version:
IS:
SHOULD BE:
I believe instructions (or sample tests) should be much more explicit with the requirements.
Some examples:
(JavaScript)
Important improvement:
This is a 7kyu kata and, oviously, warriors are not supposed to implement MD5 algorithm themselves.
But, unless you've done the previous kata in the collection, it is not really obvious that you can import external modules -I've solved 40 katas on Codewars and it is the first time I see it (TBH I didn't even consider that was possible).
Suggestion:
Add this text at the beginning...
... and include the following tip:
*** Fix for this bug ***
In the Kata Test Cases, inside the function lastDayIsFridayCheck(), there's the following three lines:
.setMonth() expects a zero-based integer (ie. 0 for January)
The following will fix the problem:
The random tests are wrong.
For example:
... but year 2014 clearly had 3 months ending in Friday.
It'd be good to add examples in the instructions (they'll look very verbose but helpful anyway).
Array.prototype.flat() is only supported from NodeJS v.11:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat#Browser_compatibility
Codewars currently uses NodeJS v8.1.3 (you can check the version at the top of the Kata screen: there's a drop down allowing you to choose language + a dropdown to choose the version).
Instructions for this kata should actually include an additional example to explain that a word can also be an anagram of itself.
Eg:
It is an important factor because implementation can be largely simplified (you can sort all the words of the array at the beginning and then just count the number of words that are equal).