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.
same for me, test case 8 has failed.
cannot understand where it went wrong.
Try optimizing your algorithm instead of listing every element in the sequence.
.
Your code failed to handle duplicate values.
For example, let's use the collection
[1,2,3,2]
and theitems_per_page
is2
. The pages should be[1,2]
and[3,2]
. With your solution, if you dopage_index(3)
, it returned0
. Even though, the element fromcollection[3]
is put on page1
.So, it's a bug in your solution. Not a kata issue.
No need to be angry. Description does not imply clearly that both empty arrays should return
True
since they are technically the same in which your solution does not fulfil this criteria.