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.
Better?
It does not say that, that is the problem. In the description, the 2 examples are with break days at distance and not consecutive. Also you can read:
<<You can work for up to k consecutive days, but after that, you must take a mandatory break day where you earn nothing.>>
The working days are "up to k", but the mandatory break day is singular so can be confusing (at least for me).
It would be better specifying that for break days too, sort of:
<<You can work for up to k consecutive days, but after that, you must take one or more consecutive mandatory break days where you earn nothing.>>
Where does it say that?
The examples clarify clearly you can take multiple breaks. Or are you talking about multiple consecutive break days? Even then, where does it forbid that?
thank you. I thought no more than one break day was allowed.
You skip 3 and 1. You can skip as many as you want, what you can't do is work for more than k consecutive days in a row.
ok, based on that how this can be right -> assert_equals(maximize_earnings([5, 3, 1, 8], 1), 13, allow_raise=True); ?
The only way to get 13 is 5 + 8. How that would return that value?
No, they represent the earnings per day, you can't rearrange them.
does it mean that the list of values is not meant to be "sorted" in a convenient way? For example [5000, 4000, 3000, 1000, 2000]? The sequence is fixed?
Because if you skip 1000, you can only work for up to 3 consecutive days (not 4 like you did there), and you'll have to take a break again. Any combination where you discard another day will give you less than 13000.
Why this:
assert_equals(maximize_earnings([1000, 2000, 3000, 4000, 5000], 3), 13000, allow_raise=True);
does it return 13000 (excluding 2000), instead of returning 14000 and excluding 1000?
What I understood from the description is that you should consider as days off, the less convenient from a value prospective (so in that case 1000).
Thanks
the issue is still there