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.
Needs more random tests, there are hardcoded solutions, please take care of that
Python Translation (Author inactive)
I thought I'm the only that perceives "precede" as directly before it. The description reallly needs a rework.
It's not difficult at all.
I'm glad my frustrations led you on the right path ^_^
This comment really helped a lot, the description is confusing no doubt !!!
The description is still confusing as hell. At first I thought you're meant to compare number of drinks, then total amounts of them, until I noticed key word 'precedes'. It took me another 10 headbangs to the wall until I realised it's actually about positioning! Then I thought beer MUST next to wine for it to count as preceding...
Just felt like going round in circles and solving based on provided tests and not description. Or maybe it's just my poor understanding of some english words, idk :P
Explaining why those examples return what they do would be a great step to improve this kata.
Random tests are vulnerable to input modification.
Thanks for the feedback. Description altered
Removed!
Handling a sparse array in JS is not that easy though, there are some hidden traps ;-)
Dictionaries/tables/key-value maps in most languages do not maintain any key orders (unless the implementation is specifically designed to have this property), especially in JS, so any wording with implications to key order is pointless and wrong.
The description is suggesting a very weak grasp of the language, and should be revised to not mislead others.
The orders of the items in the arrays are not specified (by the order of occurrence the input array).
It's already been changed. Though there is a separate related issue.
Yay! A sparse array! :D
Loading more items...