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.
Good Kata. If you don't know what to do here, check out "Simplexer" first, since it teaches you the basics of Expression Parsing.
This comment is hidden because it contains spoiler information about the solution
Go random tests are broken:
There is some wording weirdness in the instructions. I would understand how a sequence of elements in this sense can be contigous - it would be a slice of the original array. Then non contigous would be when it's not a slice of the original array, ie it has one gap. There is no sensible definition for calling an element contigous which the description does as it's not a property of the element. I understand what it's trying to say though. I would reprhase the instructions. Also would explicitly explain that no joint pairs following the original array order are allowed.
This operates on arr in place. While it wasn't explicitly stated the function should operate on a copy, one could argue the return type only makes sense if the function operated on a copy.
Had to read some Parser Theory articles and make my first grammar for this kata! What do you think, does it looks good?
i used imaginary syntax though
Go preloaded tests are not quite right. It doesn't correctly pick up the set variables
clues
andexpected
. I assume because the examples run after all lines of the Describe are evaluated, so the way it's done it only runs with last clues and examples. Could we move setting these variables inside theIt
?This comment is hidden because it contains spoiler information about the solution
This has confusing instructions. I don't mind the chessboard story or what's there but what's missing. There should be some explanation that you expect the results in a rational representation. It shouldn't be a guesswork that the returned array represents a rational number. I did go, and []int is not a natural way to express rationals.
ok admittedly I haven't read the instructions for other languages which have a hint. I rephrase the suggestion as mentioning this as a language independent requirement at the top.
kata hint != kata suggestion
Seems to be fixed.
Then why, in the test case with a set, the expected size of the set is 5?
first yielded value => {}
second yielded value => {0}
third yielded value => {0, 1}
fourth yielded value => {0, 1, 2}
fifth yielded value => {0, 1, 2, 3}
It yields 5 values and closes. Then why is the expected set {0, 1, 2, 3, 4}?
Error messages in javascript are useless:
same here:
expected 1 to equal 1
WTF is this in JS?Fixed test only tests queen promotion and en-passant by black.
Worse, random tests doesn't even test en-passant, so en-passant by white is never tested at all.
Loading more items...