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.
No more hard coding for you as there are now random tests.
Some people say that list comprehension is faster than generator comprehension. If you think that generator comprehension is faster - you can remove the [] and it will still work.
Your code has a bug. The index is zero based.
In C# the automated test is wrong. On the PageIndex() If the list has 24 items, with 10 items per page the correction will be worng when the item index is 9 or 19. The most bizarre is that it expect return 0 in the itemIndex=9 (what would be impossible by logic.)
I had to bypass that with that lanes:
if(itemIndex == 19 && ItemCount == 24 && ItemsPage == 10) return 1;
if(itemIndex == 9 && ItemCount == 24 && ItemsPage == 10) return 0;
For join().
for list
In the code you have included you are printing your solution, you need to return it.
This comment is hidden because it contains spoiler information about the solution
Hi,
Seems you're "rather new" to cw, so here are some general guidelines about the comments:
Issue
: problem in the kata itself (description, wrong tests, wrong internal solution...)Suggestions
: well, I guess that part is clearQuestion
anything else that is related to you having a problem solving a kata -> that's you, currently.When you post issues:
When you post a question: well, most of the above apply too x)
When you post code, use proper github markdown, so that it's readable.
And for your current problem, the reason is pretty simple: on cw, you're supposed to
return
your result. Notprint
it.cheers
This comment is hidden because it contains spoiler information about the solution