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.
Hi, we are filling the elements of arr with 1's.
In arr[a:b+1]=[1]*(b-a+1) , (b-a+1) is the number of times [1] will be filled in arr within the range [a:b+1] (which orginally contained 0's).
So, even if a day is repeated, the function will count it one time only as it is summing the elements of arr and for a particular day(index of arr), 1 can be filled/counted once only.
Hope it helps (:
Regards