I do not understand the meaning of blocks here and why is the size given as a range i.e size is given as
[ i * k + 1, min( (i + 1) * k, N ) ], I do not understand this. Kindly help.
Max Sum K - Partition
It means divide array in blocks of size k. Its just that the last block might have elements less than k.
For eg.
Divide array of 10 in sizes of 4.
So you get subarrays : [0,3] , [4,7] , [8,9]. (Note last block has size 2 only)
[ i * k + 1, min( (i + 1) * k, N ) ] this might look ugly to understand but it just means this. Nothing else!
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.