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.
Sorry, forgot to thank you for your help! Solved the problem in no time thanks to your test case note!
English is apparently such a mess.
This is basically what "rearrange" means. If tests are failing for you, then most probably you do not check for rearrangements correctly. One potentially tricky case:
scramble('a', 'aa')
should returnFalse
.This comment is hidden because it contains spoiler information about the solution
Holy.. Never felt this stupid. Much sorry and a big thank you for pinpointing the problem! I'm done with this kata now 😄
The key is in this part:
That method returns how many items per page are in a certain page.
Using list [1, 2, 3, 4] and page length 1:
I apologize for my earlier rude behaviour . I have re-read the description many times with all concentration i am capable of, but still struggle to understand why index 3 of a 4-item array with one page consisting of one element would be equal to 1. From the examples in the task description it looks very clear to me that 3rd index should belong to page with index 3, since 3rd index is the last element in the array. I would highly appreciate if you could explain why i am wrong.
closing to keep a single issue
duplicate issue
has been approved
This comment is hidden because it contains spoiler information about the solution
Does this map avoid recursion? If so, clever and practical idea!
Edge case: List [1,2,3,4] with 1 item per page:
page_item_count is returning incorrect value for page_index 3: 0 should equal 1
Excuse me?? I know my answer is not correct, but why does it expect 1 if it should've been 4(th page)?
This comment is hidden because it contains spoiler information about the solution
Loading more items...