In question, it says size of each block shall be [i∗K+1,min((i+1)∗k,N)] for 0≤i≤N/K ,but in the solution the size of each partition is K (and the last leftover part). So, I am confused regarding the size of the partition to be considered to solve the problem
Doubt regarding the size of partitions of the array
If you dry run and calculate the size of partitions for each of these indices it will come out to be that only
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.
all I can figure out is, for i=0, it is: [0K+1, min(1K, N)]=[1, K]
i=1, it is: [K+1, min(2*K, N)]
how are these supposed to have value K each? Am I missing something?
???please reply