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.
The desciption doesn't mention the requirement of needing to return False upon bad input besides the examples, and even implies that the input is purely numerical.
Also, the provided testcases do not include negative numbers, or bad input.
Testing .page_item_count() method for 1 elements, 1 elements per page, page number 0
It should work for random tests too: 1 should equal 0
There is 1 element on page 0, and there is 1 page, the random test is wrong.
The "1110000000111" is a good test, since "- -" (runlength 1) is the only valid possibility.
"111000111" is ambigous, both "- -" (runlength 1) as well as ".." (runlength 3) are valid possibilities.
"111000111000111" is ambigous, both "- - -" (runlength 1) as well as "..." (runlength 3) are valid possibilities.
"111000000000111" is a good test, since ". ." (runlength 3) is only 1 valid possibility.
This comment is hidden because it contains spoiler information about the solution