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.
It is not possible to remove a submitted translation. You can submit others.
This solution is actually wrong. It passed the tests but it falsely accepts
[[1, 1], []].sameStructureAs([[1,1],1])
to be true. If you know how to delete it, please let me know.I recommend switching countries' product counts in test data. Currently the results match the solution even when you omit the "ORDER BY products DESC" (and the test fails).
Fixed.
Thanks, I'm glad you enjoyed it!
I had to look at a real piano before I realized I used wrong number of keys per scale. Great kata.
Slight improvement to this solution is reversing the order of array functions. Before using unshift, the index for first splice is 3, after unshift it's 4. If you reverse the order ( first add "-", then ") " and at last "(" ), you don't need to worry about index numbers changing.
I did the JavaScript version. The Kata description says "You have to use the filter-method of Python ..." which was wery confusing.