Assuming index final is the last one to pop, then we must have poped the left side and the right side. So coins when we pop final is
rangeValue[start][final-1] max coins from left side
rangeValue[final+1][end] max coins from right side
and current sequence is
start-1, final, end + 1
@fhqplzj Thanks for the hint where to look. These kinds of problems are not easy to come up with the solution quickly unless somebody explained a similar one to you before and you solved on your own. The explanations in other posts are not good enough, the one in the book you mentioned is excellent.