@BHC that is correct. But once a player picks a number, it is removed from the sequence, which renders the end of the sequence changed.
e.g [1,2,3,4,5], player 1 can pick 1 or 5, if P1 pick 1, then the array becomes [2,3,4,5]. Then player 2 can make the choice between 2 or 5.

@RunRunCode this is because there is an ascending loop for len. dp[i][j] with a smaller len has already been computed. Therefore, lhs ascending is not a problem here.

@dachuan.huang Hi dachuan.huang. Thanks for the feedback.

Nice catch. Typo corrected.
You are right. Take a look at this stackoverflow post
The final return statement is just a dummy statement required by java method.