I am not able to understand the case, as when I am selling the book at ith position how can we recur for left and right part only without considering the option for the case where the last element for the left part and the first element of right part are adjacent.
Regarding state relation
@Vishal_234 you are very right with your doubt. Actually pivot is the book we sell last and not now!
so we can now solve for left and right parts separately as current(ith) book act as bridge!
In video it is wrongly mentioned as mentor said we sell ith book!
But actually we sell this book at last.
1 Like
Ok thanks for clearing my doubt.
1 Like