Other possible approach for Book allocation problem

Is there any approach other than binary search for this problem like using DP…even though binary search is optimized one i want to know other possible approach.

@anika203a see this link

I’m not able to write a code for the same… can you help me for solving it using DP

@anika203a first you try to write then i will help you in debugging


just tried this…but getting error

@anika203a hey according to me the binary search solution for this problem is indeed using memoization, but it doesn’t form any overlapping subproblems in this case. At every stage, you are just dividing the books between given students and in the end, picking out minimum possible maximum books. I don’t think DP is in fact required to be applied here.

Yeah…I was just trying to apply other approaches to solve this… but thats fine
Thanks

@anika203a no problem happy coding!!

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.