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.
I love how you created the blocks and used array's 'every' method. I troubled over traversing blocks for a little bit and love how you were able to organize them. Moreover, I didn't know about array's every method. Thanks for positing.
By chance do you know the time complexity of your solution ? just trying to understand time complexity more. It does doesn't matter since the input will never be massive, but am interested for learning. initially my thought is that organizing the data takes n^2 (n rows with n items). js' sorting algoritm takes n log n, I believe. it's done three times for n array. n^2 + (n log n * 3n) => n^2 log n ?
any feedback appreciated!