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 tested functional programming vs a for loop and it seems like the for loop can be about 100ms faster than the functional programming approach. Not too sure why
Agreed, I remember reading that somewhere -- but why? because of the lambda function, right?
Actually not the best practice. List comprehension would be more fitting
Awesome use of tap and flatten! I didn't know Array had an "each_with_index" function! Thanks!
Thanks!
Oops, I failed a random test now!
:)
Best
Oh, no! Oh, my god!
Fixed, I keep forgetting about the differences in Ruby's vs. Python's shuffle.
Thanks, man :)
All of my random tests in Ruby were Jonathon Joestar, is this expected?
The random tests appear to be incorrect. We are instructed that page -1 should return -1 for out of bounds requests.
Testing .page_item_count() method for 14 elements, 3 elements per page, page number -1
It should work for random tests too: -1 should equal 3